there is a problem with Kirby 3 when using Apache’s VirtualDocumentRoot functionality (having multiple virtual hosts with only one configuration block in httpd.conf):
When trying to access the kirby pages, the path is not found. As soon as i change apache’s configuration to a regular virtualhost configuration everything works as expected).
With the very first version of Kirby 3 i tracked that problem down and changed one line of code in the area somewhere around the request uri is detected. Than kirby works with both regular virtual hosts and VirtualDocumentRoot configurations as well. Its just one simnple thing where the current request uri is not build properly… but I can’t find it again and now i need to upgrade to the current version…
Therefore i need the help of the developing team to fix that kirby bug. It is very easy to reproduce:
Activate mod_vhost_alias and set up a configuration like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerAlias *.local
# include the server name in the filenames used to satisfy requests
VirtualDocumentRoot /home/vhosts/%0/
</VirtualHost>
This serves virtual hosts from directories like:
/home/vhosts/www.client-one.local
/home/vhosts/www.another-one.local
and so on.
The problem is that kirby can not detected the request uri and will not serve any request. Instead it shows up an error message that something went wrong.
In 3.2-rc1 this situation still exists, too. After fresh install 3.2-rc1 just keeps saying “Not found”.
As soon as you change that line, it starts working again under both conditions: Apache2 regular virtual hosts, and VirtualDocumentRoot configurations as well
Please consider taking this one over into the code base for the next release candidate.
Hopefully this can be updated for 3.2-rc2 @texnixe
That’s intended. It has been in there before. The parse_url method needs a full URL, not just a path, otherwise it will fail. Appending our domain is only there to make the parser work. The rest of the URL is detected further down.
With both configs I only get 404 errors on any subpage. I don’t know what is wrong with but it has defenitely to do with kirby itself and not my own config as it is working with other CMS quite nice.