I have a Symfony project with the file index.php
in /var/www/public
.
I want to only allow access to the website using a virtual generate
folder, so the site should always be accessed like this: http://localhost/generate
.
http://localhost/
should just throw a 404.
I'm using the following Apache config, but the $_POST
and $_GET
globals are missing when I debug my script (I'm firing a POST request from Postman). It works when I reset my Apache config to just serve from the root without any alias..what is going on?
I'm not using any .htaccess files in my /var/www/public
folder.
The Apache config:
<VirtualHost _default_:80>
ServerAdmin webmaster@localhost
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<FilesMatch ".+(\.php)$">
SetHandler "proxy:fcgi://127.0.0.1:9100/
</FilesMatch>
DocumentRoot "/var/www/public"
Alias /generate /var/www/public
<Location /generate>
AllowOverride All
</Location>
</VirtualHost>