server
{
listen 80;
server_name 192.168.1.33;
index index.html index.htm index.php;
root /www;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
location ~* \.(js|css|jpg|jpeg|gif|png|bmp|ico)$
{
expires 10d;
access_log off;
}
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;
}
#try_files $uri $uri/ /index.php;
}
location ~ .*\.(php|php5)($|/)
{
include fastcgi_params;
include fastcgi.conf;
set $script $fastcgi_script_name;
set $path_info "";
if ($fastcgi_script_name ~ "^(.+\.php)/(.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$script;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_NAME $script;
}
access_log /www/logs/192.168.1.210.access.log combined;
}
网友评论