Skip to main content

Apache Alias directive not working un EA4 with PHP-FPM

Comments

4 comments

  • outofcontrol
    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
  • outofcontrol
    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
  • JacobPerkins
    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
  • outofcontrol
    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.