Nginx在某些情况下下载php文件(并非全部)
我对php5 fpm和nginx有奇怪的问题 以下是我的nginx配置:Nginx在某些情况下下载php文件(并非全部),nginx,php,Nginx,Php,我对php5 fpm和nginx有奇怪的问题 以下是我的nginx配置: server { listen 80; root /usr/share/nginx/www; index index.php index.html index.htm; server_name example.com; location / { try_files $uri $uri/ /index.html; } error_p
server {
listen 80;
root /usr/share/nginx/www;
index index.php index.html index.htm;
server_name example.com;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
# pass the PHP scripts to FastCGI server listening on /var/run/php5-fpm.sock
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
所以我把phpbb论坛和phpMyAdmin下载到/usr/share/nginx/www
每个都在自己的目录中。所以我有两个目录:/usr/share/nginx/www/phpMyAdmin和/usr/share/nginx/www/phpbb
当我尝试访问时:web浏览器下载phpMyAdmin的index.php,但当我导航到:它呈现整个论坛,它是用php编写的,因此它正确解析php。
ABOVE配置是我仅有的一个活动配置
重要提示:如果我导航到它,工作正常
有什么建议吗
我在配置nginx时遵循了该教程:我发现这是浏览器问题,而不是服务器问题。当我清除浏览器中的缓存时,一切正常