Apache Alias directive not working un EA4 with PHP-FPM
Under EA3 we had an Alias in /usr/local/apache/conf/userdata/ssl/2/user/domain/domain.conf like this:
This worked well. Under EA4 I've put the alias directive under /etc/apache2/conf.d/userdata/ssl/2_4/user/domain/wiki.conf and rebuilt and restart apache. However, we are getting this error in the browser:
And in the /var/log/apache2/error_log I get this:
Ownership of the file is correctly I think, owned by user:user and chmod 644. Not sure where else to look to see why this doesn't work. Anyone have any ideas on how to make this work?
Alias /wiki /home/user/public_html/wiki_2This worked well. Under EA4 I've put the alias directive under /etc/apache2/conf.d/userdata/ssl/2_4/user/domain/wiki.conf and rebuilt and restart apache. However, we are getting this error in the browser:
No input file specified.And in the /var/log/apache2/error_log I get this:
Got error 'Unable to open primary script: //home/user/public_html/wiki_2/index.php (No such file or directory)\n'Ownership of the file is correctly I think, owned by user:user and chmod 644. Not sure where else to look to see why this doesn't work. Anyone have any ideas on how to make this work?
-
Just discovered that if I try and load a non-PHP file within /wiki, it loads perfectly fine. So this issue is only affecting PHP files. Which seems to indicate it's a PHP-FPM misconfiguration somewhere. Hopefully this will in trouble shooting this. 0 -
Today, no further ahead, I created two files in /wiki: /wiki/test.php and /wiki/test.html. They both contain simply one word: Hello. The HTML file loads fine in the browser. The PHP file doesn't load showing simply "No input file specified." Apache2 error log always shows: AH01071: Got error 'Unable to open primary script: //home/user/public_html/wiki_2/test.php (No such file or directory)\n'
Permissions on the file are correct:# ls -l wiki_2/test.php -rw-r--r-- 1 ogall ogall 6 Apr 25 12:40 wiki_2/test.php
The rest of the site works fine, just the wiki with this alias isn't working. Not sure what else to check. :(0 -
Howdy, I think this is going to need an adjustment to the FPM config line inside httpd.conf. I want to say that it redirects to the DOCROOT, and Apache won't redirect those with FPM as it'll hand off the request to FPM before it reaches the redirect. SetHandler proxy:unix:/opt/cpanel/ea-php55/root/usr/var/run/php-fpm/90982df21aa4c9ac9ef6af041aac95218072595c.sock|fcgi://domain.com/
I think this'll need to be adjusted.0 -
Ugh, okay then. I've installed suPHP and set that site to not use php-fpm. Problem solved. 0
Please sign in to leave a comment.
Comments
4 comments