server {
charset utf-8;
client_max_body_size 128M;
## listen for ipv4
listen 80; ## listen for ipv6
#listen [::]:80 default_server ipv6only=on;
server_name basic.local;
root /home/ahcj/www/basic/web;
index index.php;
access_log /home/ahcj/www/basic/log/access.log;
error_log /home/ahcj/www/basic/log/error.log;
location / { # Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
} # uncomment to avoid processing of calls to non-existing static files by Yii
#location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
# try_files $uri =404;
#}
#error_page 404 /404.html;
location ~ \.php$ {
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; #fastcgi_param HTTPS on;
try_files $uri =404;
}
location ~* /\. {
deny all;
}
}