On our dev server we use mutiple subdomains:
so it is project.developer_name.fqdn.ending
Right now I have kirby.malte.dev.example.com and using the Kirby Starterkit the assets can’t be loaded.
Using the console / site() object I can see, that Kirby is ignoring the first part of the subdomain:
Kirby uses the values that are set by the web server using server environment variables. I don’t see any operation that could be causing this directly.
Could you please check what is inside your $_SERVER object?
In the meantime, you can also set the url option to the full URL manually:
Setting it manually (I think it is meant to go int /site/config/config.php?) doesn’t change anything, the assets still can’t be loaded
Thanks so much for your help!
Best
Malte
ps: if it helps - seeing that $_SERVER['SERVER_NAME'] is set wrong - I am running nginx with wildcard subdomains; every folder in /home/malte/__project__/docs automatically gets a vhost for __project__.dev.example.com
Hm, in your nginx result posted above, SERVER_NAME is set to the regex that is used to match the subdomains. Of course that can’t work as Kirby expects the current host name there.
It looks like this is just the way nginx sets environment variables. HTTP_HOST would be correct here.
Kirby isn’t officially compatible with nginx, but this still looks like a bug.
If anyone knows a robust and reliable way to detect the host that is compatible with all common web servers, please send a PR to the Toolkit repo.