• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 admin.php "not found" after configuring for php-fpm

Ridemonkey

Well-known member
#1
I just switched a server over to PHP5-FPM this morning. All seems well, except when I try to get into the admin control panel - I now receive a 404 not found error for admin.php.

I can't really find any other errors on the site, even other /*.php files are accessible (sitemap.php, etc).

(note, this is not on the site listed in my signature)

Can someone help explain why this is?

Code:
<VirtualHost *:80>
        ServerName mysite.com
        DocumentRoot /var/www/mysite
        <IfModule mod_fastcgi.c>
                AddType application/x-httpd-fastphp5 .php
                Action application/x-httpd-fastphp5 /php5-fcgi
                Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
                FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
                <Directory /usr/lib/cgi-bin>
                        Require all granted
                </Directory>
        </IfModule>

        <Directory /var/www/mysite>
                AllowOverride All
        </Directory>
</VirtualHost>
 

Brogan

XenForo moderator
Staff member
#2
Are you using LiteSpeed?

I have seen two other reports of that this week and they were both using LS.
 

Ridemonkey

Well-known member
#3
No, Apache.

root@www:/etc/apache2/sites-available# apachectl -v
Server version: Apache/2.4.7 (Ubuntu)
Server built: Mar 10 2015 13:05:59

Also, the admin.php is definitely still there and the permissions haven't changed on it.
 

Brogan

XenForo moderator
Staff member
#5
It's difficult to say without a link to the site to potentially see what is going on.
Is this for a test install of your production site?

However:
I just switched a server over to PHP5-FPM this morning.
That would suggest some sort of server configuration issue.
 

Ridemonkey

Well-known member
#7
Are you really sure you use PHP-FPM with Apache? Apache is not really compatible with PHP-FPM.
Apache can use fastcgi to pass the processing off to php-fpm. I can promise you it is working since I've uninstalled mod_php5 and the site remains functional :)

Brogan, check your PMs - thanks!
 

Ridemonkey

Well-known member
#8
Fixed it. It was a residual configuration in my php-fpm www.conf file from testing another server config.

Protip: when cycling through a couple test configurations, keep backups of the clean config files instead of trying to remember which ones you changed :D