php-nginx.conf
2016-09-30 本文已影响0人
星星的简书
server{
listen 80;
server_name badminton.wxandcc.com;
index index.php index.html index.htm ;
root /home/www/badminton;
location / {
if (!-e $request_filename){
rewrite ^/(.*) /index.php last;
}
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log /tmp/xxxx.log ;
location ~ [^/]\.php(/|$)
{
try_files $uri =404;
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}