• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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