Nginx reverse proxy fails after update

Freddy

Verified User
Joined
Apr 14, 2016
Messages
119
Nginx fails to start after it updated to version 1.17.8. Directadmin updated to version 1.60.0 at the same time. Maybe the problem is related?

When starting Nginx it fails instantly. This is the log.
Jan 28 08:47:08 <servername-hidden> systemd[1]: Starting The nginx HTTP and reverse proxy server...
Jan 28 08:47:08 <servername-hidden> nginx[2007]: nginx: [emerg] open() "/usr/local/directadmin/data/users/apache/nginx_php.conf" failed (2: No such file or directory) in /etc/nginx/directadmin-ips.conf:17
Jan 28 08:47:08 <servername-hidden> nginx[2007]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jan 28 08:47:08 <servername-hidden> systemd[1]: nginx.service: control process exited, code=exited status=1
Jan 28 08:47:08 <servername-hidden> systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Jan 28 08:47:08 <servername-hidden> systemd[1]: Unit nginx.service entered failed state.
Jan 28 08:47:08 <servername-hidden> systemd[1]: nginx.service failed.

And indeed, the file "/usr/local/directadmin/data/users/apache/nginx_php.conf" does not exist because there is no userfolder "apache". Where did this config come from?

Content of /etc/nginx/directadmin-ips.conf
Code:
# Auto generated nginx config file by DirectAdmin version 1.60.0
# Modifying this file is not recommended as any changes you make will be
# overwritten when you add/remove ip's through DirectAdmin.

server {
        listen [<hidden-IPv6>]:80 default_server;
        server_name _;
        root /var/www/html;
        index index.html index.htm index.php;
        include /etc/nginx/nginx-userdir.conf;
        include /usr/local/directadmin/data/users/apache/nginx_php.conf;

        # deny access to apache .htaccess files
        location ~ /\.ht
        {
                deny all;
        }

        include /etc/nginx/webapps.conf;
}

server {
        listen [<hidden-IPv6>]:443 ssl http2 default_server;
        server_name _;

        ssl_certificate      /etc/httpd/conf/ssl.crt/server.crt.combined;
        ssl_certificate_key  /etc/httpd/conf/ssl.key/server.key;

        root /var/www/html;
        index index.html index.htm index.php;
        include /etc/nginx/nginx-userdir.conf;
        include /usr/local/directadmin/data/users/apache/nginx_php.conf;

        # deny access to apache .htaccess files
        location ~ /\.ht
        {
                deny all;
        }

        include /etc/nginx/webapps.conf;
}

The updates that has run this morning where:
DirectAdmin 1.59.5 to 1.60.0 update is available.
Let's Encrypt client 1.1.38 to 1.1.39 update is available.
Nginx 1.17.7 to 1.17.8 update is available.
Libwebp 1.0.3 to 1.1.0 update is available.
Libjpeg 9c to 9d update is available.
ICU4C 64.2 to 65.1 update is available.
PHP 7.3: 7.3.13 to 7.3.14 update is available.

How to fix this? For now, I'm going back to running apache only without Nginx because the whole webserver is down.
 
Thanks for the fast reply.
I'll wait for 1.60.1 before trying to run Nginx reverse proxy again.
 
Back
Top