Closed appdev closed 8 years ago
是不是上面的修改出错了?把你修改后出错的完整配置贴出来一下吧。。。
昨天直接用Vim改的 不知道什么问题今天换成sublime修改就可以了。可以正常打开了,但是我用的是nginx用了那个nginx的配置但是除了首页其他页面还是404 不知道什么原因,最下面那个
注意此处的.php 后面的$符号要删去,切记如此 这个什么意思 这个是我的vhost的配置:
server
{
listen 80;
server_name ss.apkdv.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/shadow;
#error_page 404 /404.html;
location / {
if (!-e $request_filename ) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ \.php {
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi_pathinfo.conf;
include fastcgi_params;
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php )(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}
access_log off;
}
因为我很久不用 Nginx 所以不知道具体应该如何配置。这个请参考网友给出的配置自己尝试。
这个是需要把config-sample 改为config.php吗?我没改之前说配置不存在,改了之后说提示
我的67行是这个