m1ne
Well-known member
Hey all.
I'm trying to set up nginx within Plesk 12. Using the "Additional nginx directives" in Plesk, I add this,
and get this error:
Any idea? Thanks.
I'm trying to set up nginx within Plesk 12. Using the "Additional nginx directives" in Plesk, I add this,
Code:
server {
listen [::]:80;
server_name example.com www.example.com;
root /var/www/example.com;
index index.html index.htm index.php;
access_log /var/www/logs/example.com.access.log;
location / {
try_files $uri $uri/ /index.php?$uri&$args;
}
location ~ /(internal_data|library) {
internal;
}
location ~ \.php$ {
fastcgi_pass unix:/tmp/php.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
and get this error:
Code:
Invalid nginx configuration: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/example.com/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed
Any idea? Thanks.