Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Big troubleshootings into NGINX configuration

Yan-David
Nimbostratus
Nimbostratus

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

2 REPLIES 2

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 

Yan-David
Nimbostratus
Nimbostratus

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