nginx配置
server {
listen 80;
server_name xx.com www.xx.com;
index index.html index.htm index.php;
#access_log /var/log/nginx/xx.a.log;
#error_log /var/log/nginx/xx.e.log;
location ~ .*\.php(\/.*)*$ {
root /apps/www/bolg;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
root /apps/www/bolg;
index index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
if ($request_uri = / ){
rewrite (.*) /index.php;
}
}
location = / {
rewrite (.*) /index.php;
}
}
用了你的配置好了
可以的