这个困扰我将近一个星期的问题,百度了一个星期都没有找到我想要的答案,对于一个nginx小白的我来说真的是个烦人的问题,这一个星期里我都好几次想放弃,不过事实证明坚持下去是没有错的,好了话不多说进入正题:
首先打开我们的nginx配置文件:nginx.conf 找到server{...}这块,我的是这样的,
server {
listen 80;
server_name www.chemistry.com chemistry.com;#charset koi8-r;
#access_log logs/host.access.log main;
root "E:/phpStudy/WWW/chemistry-smarty";
location / {
try_files $uri $uri/ /index.php?$query_string;
index index.html index.htm index.php l.php;
autoindex off;
}#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {