应用配置文件:
server {
listen 80;
server_name xxx.com;
access_log /home/wwwlogs/xxx.com_access.log;
error_log /home/wwwlogs/xxx.com_error.log;
set $root /home/wwwroot/xxx.com/public;
location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
root $root;
}
location / {
root $root;
index index.html index.php;
if ( -f $request_filename) {
break;
}
if ( !-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;
}
}
location ~ .+\.php($|/) {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fa