• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Nginx Error Additional nginx directives

iGraphics

Basic Pleskian
Server operating system version
CentOS Linux 7.9.2009 (Core)
Plesk version and microupdate number
18.0.57 #5
Hello, I using wordpress inside my dedicated Server I want to use the PHP run with FPM Application Served by nginx and I convert the .htaccess by the Plesk Extension (htaccess to nginx).
Code:
# BEGIN WordPress

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

to

Code:
    setenv HTTP_AUTHORIZATION:$http_authorization;
#ignored: "-" thing used or unknown variable in regex/rew
#ignored: "-" thing used or unknown variable in regex/rew
if (!-f $request_filename){
    set $rule_2 1$rule_2;
}
if (!-d $request_filename){
    set $rule_2 2$rule_2;
}
if ($rule_2 = "21"){
    rewrite /. /index.php last;
}

1703848645596.png
But I got the Error:
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain.com_webmail.conf:7

This error is repeated for all domains on the server

like that:

Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain2.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain3.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain4.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain5.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain6.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain7.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain8.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain9.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain10.com_webmail.conf:7
Invalid nginx configuration: nginx: [warn] protocol options redefined for MYIP:443 in /etc/nginx/plesk.conf.d/webmails/mydomain11.com_webmail.conf:7

Please Help
 

Attachments

  • 1703848633867.png
    1703848633867.png
    4.2 KB · Views: 1
You don't have to convert the default .htaccess file when you switch to FPM Application Served by nginx. The WordPress Toolkit should take care of that for you.

If it doesn't work, please check the "Custom error documents" option in the Hosting settings. It should be turned off.
 
The "protocol options redefined" can be ignored or solved by reconfiguration of the affected web server configuration files. The log entries are just warnings and came into play when Nginx changed some configuration requirements. Plesk has already updated the algorithms that create web server configuration files, but it does not auto-update the files itself. You could use the "Web Server Configurations Trouble Shooter" in Tools & Settings to recreate these files.
 
Back
Top