Considering the following working Apache config (used inside the httpd:2.4.48-alpine docker container)
<VirtualHost *:80>
DocumentRoot "/code2"
<Proxy "fcgi://php/">
ProxySet enablereuse=On
</Proxy>
<FilesMatch \.php$>
SetHandler "proxy:fcgi://php:9000"
</FilesMatch>
<Directory /code2>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DirectoryIndex index.php
</VirtualHost>
However if I move the /code2 directory which matches the path in the php-fpm container (named "php") to e.g: /code ( I also update the DocumentRoot and Directory path ).
I get a 404 on all the php files. Why is this so? how can I provide a different path to the php files for each container?
Another interesting thing to note is that both the access log of apache and php don't display the full path to the php file thats being accessed, just the filename only.