一开始没配置根部的nginx rewrite,安装后就首页能打开,后燃加入后怎么就首页打不开了,403
一开始没配置根部的nginx rewrite,安装后就首页能打开,后燃加入后怎么就首页打不开了,403
By 麦迪奥特曼
at 2018-01-08
0人收藏 • 3491人看过
conf贴出来吧
#location / { # index index.html index.htm index.php; #} # redirect server error pages to the static page /50x.html # location = /50x.html { root html; } location ~ \.php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; } #carbon error_page 404 /404.php; # rewrite location / { try_files $uri $uri/ /index.php?$query_string; } location /.git { deny all; return 403; } location /controller { deny all; return 403; } location /docker_resources { deny all; return 403; } location /library { deny all; return 403; } location /service { deny all; return 403; } location /view { deny all; return 403; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; return 403; } }
- 登录后方可回帖
1 个回复 | 最后更新于 2018-01-08