Local multisite with different port and $url variable

i was trying to start a local multisite environment… i was always stoped by some problems on the port of the webserver… since i use build in server of php, i was using port 8000 and this makes some problems on /media
files where saved… but not reachable… maybe there were other problems, too… but i think i found a good solution:

Instead of $url = 'http://' . $host; i use now $url = kirby()->url();. This serves the port, too. There is also no need to provide the correct protocol… as far as i understand, this solution works for http and https at the same time.

@texnixe can you tell me, if this solution is a good or bad one? =)

thx in advance

I don’t know, never used it like this, always with dev environments that allow you to create hosts (or create them automatically), like Laravel Valet, Laravel Herd, in the past MAMP Pro (via aliases).

If it works for you, why not.

1 Like