对于很多首次安装X1的用户,
频道打不开,后台打不开,一般原因是服务器没有配置好,不支持 pathinfo模式,主要出现在IIS与 nginx 服务器, 而apache默认是不存在这个问题的.
针对 windows 环境下面的 nginx 环境,我们给出宝塔环境的配置方法, 其它linux 下的 nginx 环境, 大家可以对应的参数修改,原理是大同小异的.#START-PHP
location / {
index index.php index.html index.htm;
if (-e $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ .+\.php($|/) {
fastcgi_pass 127.0.0.1:4556;
fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#END-PHP
详情大家,请移步
同时可以隐藏index.php文件
IIS就建议大家不要使用了.也不安全.
为了调试这个 nginx 环境, 折腾了老朽大半天时间,从早上搞到现在. 毕竟我们之前也没使用过这个环境 .一直是用apache