Can't seem to set AcceptPathInfo in Apache
To turn on AcceptPathInfo
in Apache, (p.ex Moodle 2.9) in you will need to change httpd.conf like:
For Apache versions earlier than 2.4:
<VirtualHost *:80>
ServerName moodleback.local
DocumentRoot "/usr/local/www/moodle"
AcceptPathInfo On
<Directory /usr/local/www/moodle>
AllowOverride None
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
For Apache version 2.4.x or above:
<VirtualHost *:80>
ServerName moodleback.local
DocumentRoot "/usr/local/www/moodle"
AcceptPathInfo On
<Directory /usr/local/www/moodle/>
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
Related videos on Youtube
nageeb
IT Consultant, Software Engineer, Solutions Developer & General Problem Solver. Language buff, Idea aficionado and general Noun Modifier.
Updated on September 18, 2022Comments
-
nageeb almost 2 years
I'm trying to migrate an ExpressionEngine site onto a new server and seem to have run into a roadblock. For the desired functionality, EE requires the
AcceptPathInfo
directive to be turned on, and for the life of me, I can't seem to get Apache to cooperate.The server is running Fedora Core 18, Apache 2.4.3 with the PHP 5.4.11 Apache Module.
I've tried setting the following in my virtual host configuration:
<VirtualHost *:80> DocumentRoot /home/mysite/public_html ServerName mysite.com <Directory /home/mysite/public_html/> AcceptPathInfo On Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> </VirtualHost>
but when I debug using
phpinfo()
, it still doesn't show path_info, orig_path_info or orig_path_info_translated (which I believe are produced as a result of the AcceptPathInfo directive being turned on).I've also tried simply setting the directive
AcceptPathInfo
On in my .htaccess file, but still to no avail.I've been going through the settings between my Dev and Live environments, and it seems that the Dev server is running PHP using FastCGI and is using cgi.fix_pathinfo.
Normally, I'm fairly confident in tinkering with my httpd.conf and php.ini, but at this point, I'm way further down the rabbit hole than I'm comfortable with. What am I missing here?