nginx 反向代理后为什么访问php文件 会提示404
2016-05-17
展开全部
server
{
listen 80;
server_name test.bagesoft.net;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/test.bagesoft.net;
include none.conf;
location /{
proxy_pass http://ddt.shulong.cc;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
}
location ~ .*\.(php|php5)?$
{
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
{
listen 80;
server_name test.bagesoft.net;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/test.bagesoft.net;
include none.conf;
location /{
proxy_pass http://ddt.shulong.cc;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
}
location ~ .*\.(php|php5)?$
{
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询