HolyDiver
Verified User
- Joined
- Feb 21, 2016
- Messages
- 51
I updated from Debian 8.10 to Debian 9.3 and had to upgrade my php version to 5.6 (still running some legacy software). It used to run on mod_php, but since Debian 9 doesn't play well with mod_ruid2 I decided to switch to PHP-FPM (already wanted to do so later on). I'm running the nginx_apache reverse proxy option and the most recent version of DA, Nginx and Apache.
Before finding out mod_ruid2 doesn't play well with Debian 9, all pages including php pages served a 502 bad gateway error page. Error logs didn't show much useful.
After I removed mod_ruid2, I got 403 forbidden pages on php pages while the static pages and images were working again. Nginx error log showed permission denied errors.
If I chmoded php pages to 777, I noticed the php pages were getting served but with the php code unprocessed in the source code. So the reverse proxy thing worked well, but Nginx couldn't pass it through to php.
Snooping through the Nginx.conf, the only php bits in it were references like /usr/local/directadmin/data/users/USER/nginx_php.conf. Checking the contents of this conf, turned out to be blank! Checking the original template which was intact, but for some reason the HAVE_PHP1_FPM wasn't triggered. Okay, checking the httpd config section in DA for the tokens, I ran into this:
Just to be clear, DA was configured for php 5.6 on fpm and it's running fine. But obviously Nginx can't connect with unix:/usr/local/php0.000000/sockets/holydiver.sock. Every php page is now returning a 404.
My website has been down for 2 days because of this, I'm not sure if it's a bug or something is messed up on my server. I'm trying to change the config files with static values to see if it's running. But I've never had a more severe problem with DA like this, so I figured it's worth mentioning even if most people don't have this problem.
Before finding out mod_ruid2 doesn't play well with Debian 9, all pages including php pages served a 502 bad gateway error page. Error logs didn't show much useful.
After I removed mod_ruid2, I got 403 forbidden pages on php pages while the static pages and images were working again. Nginx error log showed permission denied errors.
If I chmoded php pages to 777, I noticed the php pages were getting served but with the php code unprocessed in the source code. So the reverse proxy thing worked well, but Nginx couldn't pass it through to php.
Snooping through the Nginx.conf, the only php bits in it were references like /usr/local/directadmin/data/users/USER/nginx_php.conf. Checking the contents of this conf, turned out to be blank! Checking the original template which was intact, but for some reason the HAVE_PHP1_FPM wasn't triggered. Okay, checking the httpd config section in DA for the tokens, I ran into this:
APACHELOGDIR=/var/log/httpd/domains
CB_VERSION=2
CREATOR=holydiver
DEFAULT_DOMAIN=website.net
GROUP=holydiver
HAVE_MOD_SECURITY=0
HAVE_PHP1_FCGI=0
HAVE_PHP1_FPM=0
HAVE_PHP2_FCGI=0
HAVE_PHP2_FPM=0
HAVE_RUID2=0
HAVE_SUEXEC_PER_DIR=1
HOME=/home/holydiver
HOSTNAME=server.website.net
LSPHP1_RELEASE=
LSPHP2_RELEASE=
NGINX_MOD_SECURITY_ENABLE=
OPEN_BASEDIR_AND_CLI=OFF
OPEN_BASEDIR_ENABLED=OFF
PHP=ON
PHP1_RELEASE=0.000000
PHP2_RELEASE=0.000000
PHP_MAIL_LOG_ENABLED=1
PORT_443=443
PORT_80=80
RUID2_AND_MOD_SECURITY=0
SECURE_ACCESS_GROUP=access
SPACE_HTTP2= http2
SSL=ON
SUPHP=0
SUSPENDED=no
USER=holydiver
USERHOME=/home/holydiver
USER_CLI=0
USE_HOSTNAME_FOR_ALIAS=0
Just to be clear, DA was configured for php 5.6 on fpm and it's running fine. But obviously Nginx can't connect with unix:/usr/local/php0.000000/sockets/holydiver.sock. Every php page is now returning a 404.
My website has been down for 2 days because of this, I'm not sure if it's a bug or something is messed up on my server. I'm trying to change the config files with static values to see if it's running. But I've never had a more severe problem with DA like this, so I figured it's worth mentioning even if most people don't have this problem.
Last edited: