按照官网设置的直接不解析网页变成下载了,试了网上的很多版本也没用。
用的是LNMP一键安装环境。
我的vhost配置信息:
server
{
listen 80;
#listen [::]:80;
server_name domain.com;
index index.html index.htm index.php default.html default.htm default.php server.php;
root /home/wwwroot/domain.com/public;
#error_page 404 /404.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/domain.log access;
}
我的配置是这样的: