• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved Plesk nginx conf files, seem to bring to an error notification when running 'nginx -s reload'

Ehud

Basic Pleskian
Server operating system version
nginx version: nginx/1.24.0 Server version: Apache/2.4.57 (Ubuntu) Server built: 2023-04-08T12:56:02
Plesk version and microupdate number
Product version: Plesk Obsidian 18.0.53.2 OS version: Ubuntu 22.04 x86_64 Build date: 2023/06/19 12:00
Hi,

The Plesl nginx domain file configuration, includes two 'server' blocks to liste for the same IP, where the first listen only server_name with a 'www' prefix, and reroutes with a '301' code into the second. To me, that did make sense.

However, nowadays, when running the CLI:

NGINX:
nginx -s reload

The error notification at the bottom of this post appears.

Any suggestion of placing those two 'listen' together within the same 'server' block, where the order of lines matters? Any other solution?


#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
proxy_cache_path /var/cache/nginx/example.com_proxy levels=1:2 keys_zone=example.com_proxy:5m max_size=134217728;

Code:
server {
        listen <server_ip>:443 ssl;


        ssl_certificate             /opt/psa/var/certificates/<certificate>;
        ssl_certificate_key         /opt/psa/var/certificates/<certificate>;


        server_name www.example.com;


        location / {
                return 301 https://example.com$request_uri;
        }


}


server {
        listen <server_ip>:443 ssl http2;


        server_name example.com;
        server_name ipv4.example.com;


        ssl_certificate             /opt/psa/var/certificates/<certificate>;
        ssl_certificate_key         /opt/psa/var/certificates/<certificate>;
        
        ...
        
}



Code:
nginx: [warn] protocol options redefined for <server_ip>:443 in /etc/nginx/plesk.conf.d/vhosts/example.com.conf:22
 
Nginx has changed something in a recent update that now requires specific instructions in configuration files for some cases. If these are missing, a warning is issued, but the functionality is not affected. Plesk is aware of the issue and will update their software accordingly.
 
Hi Peter Debik,

Thanks a lot!

Can you, by chance, suggest the manual walkaround for the above simple conf file example, possibly being moving the first 'server' block content into the second one, and keeping the order of commands?
 
Back
Top