changdian(楼主) 1

iCMS nginx+php怎样配置

iCMS nginx+php怎样配置?我按一下配置,php的访问正常,静态文件访问失败,请问怎样做调整,谢谢!
server {
listen 80;
server_name 127.0.0.1;
root /data/wwwroot/iCMS-v7.0.8;
location / {
index index.html index.htm index.php;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}

location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
root /data/wwwroot/iCMS-v7.0.8;
expires 7d;
}

}

发布于 2018-05-30 09:13 1 回复 举报
iCMSdev 2

location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
expires 7d;
}

这个改成这样 试下

发布于 2018-05-30 12:20 0 回复 举报
changdian(楼主) 3

已经可以了,谢谢了:
是权限问题!

发布于 2018-05-30 13:04 0 回复 举报
验证码 换一张
取 消