一直提示ERROR: nginx: [emerg] duplicate location "/" in /www/server/panel/vhost/nginx/aaa.bbb.com.conf:40 nginx: configuration file /www/server/nginx/conf/nginx.conf test failed
我也不知道该怎么合并。。。很烦
宝塔网站设置 就下面这些, 全部复制黏贴来了 server { listen 80; server_name aaa.bbb.com; index index.php index.html index.htm default.php default.htm default.html; root /www/wwwroot/aaa.bbb.com; #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则 #error_page 404/404.html; #SSL-END #ERROR-PAGE-START 错误页配置,可以注释、删除或修改 #error_page 404 /404.html; #error_page 502 /502.html; #ERROR-PAGE-END #PHP-INFO-START PHP引用配置,可以注释或修改 #清理缓存规则
location ~ /purge(/.*) { proxy_cache_purge cache_one $host$1$is_args$args; #access_log /www/wwwlogs/aaa.bbb.com_purge_cache.log; } #引用反向代理规则,注释后配置的反向代理将无效 include /www/server/panel/vhost/nginx/proxy/aaa.bbb.com/*.conf;
include enable-php-00.conf; #PHP-INFO-END #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效 include /www/server/panel/vhost/rewrite/aaa.bbb.com.conf; #REWRITE-END #禁止访问的文件或目录 # location ~ ^/(.user.ini|.htaccess|.git|.svn|.project|LICENSE|README.md) # { # return 404; # } location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_redirect off; proxy_pass http://127.0.0.1:5244; # 上传的最大文件尺寸 client_max_body_size 20000m; } #一键申请SSL证书验证目录相关设置 location ~ .well-known{ allow all; } access_log /www/wwwlogs/aaa.bbb.com.log; error_log /www/wwwlogs/aaa.bbb.com.error.log; } |