nginx 问题

[复制链接]
查看11 | 回复8 | 2022-1-6 23:41:38 | 显示全部楼层 |阅读模式
server

{

listen 80;

server_name www.blog.com blog.com;

index index.html index.htm index.php default.html default.htm default.php;

root/home/wwwroot/blog.com;

include /home/wwwroot/blog.com/nginx.conf;

location ~ .*\.(php|php5)?$

{

try_files $uri =404;

fastcgi_passunix:/tmp/php-cgi.sock;

fastcgi_index index.php;

include fcgi.conf;

}

}
复制代码现在用 chrome 访问www.blog.com 直接下载index.php 了
www.blog.com/* 任何其他页面都正常
chrome 访问 blog.com blog.com/* 都正常
为什么访问www.blog.com 就直接下载index.php
只在chrome 下有这问题
回复

使用道具 举报

千问 | 2022-1-6 23:41:38 | 显示全部楼层
include fcgi.conf; 对不 重启nginx没
回复

使用道具 举报

千问 | 2022-1-6 23:41:38 | 显示全部楼层
说明NGINX根本不知道怎么处理php文件。检查你php方面的配置。

回复

使用道具 举报

千问 | 2022-1-6 23:41:38 | 显示全部楼层
zhucy 发表于 2013-2-27 16:17

说明NGINX根本不知道怎么处理php文件。检查你php方面的配置。

访问 www.blog.com/*.php 都没问题 就访问跟目录 就直接下载了
回复

使用道具 举报

千问 | 2022-1-6 23:41:38 | 显示全部楼层



回复

使用道具 举报

千问 | 2022-1-6 23:41:38 | 显示全部楼层
文件有问题?
回复

使用道具 举报

千问 | 2022-1-6 23:41:38 | 显示全部楼层
只在chrome 下有这问题
那这和nginx有关吗?
回复

使用道具 举报

千问 | 2022-1-6 23:41:38 | 显示全部楼层
貌似 谷歌浏览器蛋疼了吧
回复

使用道具 举报

千问 | 2022-1-6 23:41:38 | 显示全部楼层
清空瀏覽器緩存。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行