• [Error] nginx: [emerg] duplicate location "/" in /etc/nginx/conf/supercache.conf:15

  • Tell error you get when using VPSSIM & Other members help fix it

Khuyến Mại Nâng Cấp VPSSIM Lên Business Hết Tháng 7/2018



Tell error you get when using VPSSIM & Other members help fix it
 #370  by vpssim82
 Thu Jun 21, 2018 3:51 pm
Hi vpssim,

can you please help, i got this error :

nginx: [emerg] duplicate location "/" in /etc/nginx/conf/supercache.conf:15
nginx: configuration file /etc/nginx/nginx.conf test failed

Here is the screenshot :
http://prntscr.com/jxiesy

here is what inside superchache.conf
set $cache_uri $request_uri;

if ($request_method = POST) {
set $cache_uri 'null cache';
}
if ($query_string != "") {
set $cache_uri 'null cache';
}
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'null cache';
}
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
set $cache_uri 'null cache';
}
location / {
try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?$args;
}
# SECURITY : Deny all attempts to access PHP Files in the uploads directory
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
# PLUGINS : Enable Rewrite Rules for Yoast SEO SiteMap
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
This topic has 3 replies
You must be a registered member and logged in to view the replies in this topic.
Get 25 USD Free To USE VPSSIM