22-Jun-2022 07:17
Hi,I am using a server Centos Linux 7.29.2009 on Plesk obsidian 18.0.44.:
I have this error: new configuration files for the Apache web server were not created due to errors in the configuration templates: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/subdomain.domain.fr/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed. Detailed error descriptions have been emailed to you. Please troubleshoot and click here to regenerate corrupt configuration files or here to generate all configuration files. See details in the Configuration Troubleshooter
I have this errror since I add into Plesk Additional Directives (as it is impossible to have correct links into this domain without this add) :
location / {
try_files $uri $uri/ @opencart;
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
I don't know NGINX and I am really lost into any setup.
Can you help me correct this error.
If so please give me explainations step by step including the command lines in SSH.
Thanks a lot for your help
Yan
23-Jun-2022 03:37 - edited 23-Jun-2022 03:37
Are u shure that in your configuration for this vserver is no other "/" location? Maybe post the complete /var/www/vhosts/system/subdomain.domain.fr/conf/vhost_nginx.conf file
23-Jun-2022 04:40
Hi and thnak you for your answer.
I really would like to send you the complete conf but I really don't know how to edit this config...I am more than a newbie in NGINX. To anser your question, There is no other "/" location into this server.... the only one is:
location / {
try_files $uri $uri/ @opencart;
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
Thanks a lot for your help
Have a nice day
Yan