Nginx. conf:
HTTP {
Include mime. types;
Default_type application/octet-stream;
# Log_format main '$ remote_addr-$ remote_user [$ time_local] "$ request "'
# '$ Status $ body_bytes_sent "$ http_referer "'
# '"$ Http_user_agent" "$ http_x_forwarded_for "';
# Access_log logs/access. Log main;
Sendfile on;
# Tcp_nopush on;
# Keepalive_timeout 0;
Keepalive_timeout 65;
Client_max_body_size 10 m;
# Gzip on;
# The domain name address is used before the configuration order is loaded
# Include D:/wnmp/nginx-1.4.3/CONF/vhost/test. conf;
# Include D:/wnmp/nginx-1.4.3/CONF/vhost/CI. conf;
Include D:/wnmp/nginx-1.4.3/CONF/vhost/*. conf;
}
A server configuration in the vhost folder
Server {
Listen 80;
SERVER_NAME tczsslocal.com;
Location /{
Root D:/wnmp/tczsslocal;
Index index. php index.html index.htm;
If (-d $ request_filename ){
Rewrite ^/(. *) ([^/]) $ http: // $ host/$1 $2/permanent;
}
If (! -E $ request_filename ){
Rewrite ^ /(.*)/? V = $1 break;
}
}
Error_page 500 502 503 x.html;
Location =/50x.html {
Root HTML;
}
Location ~ \. Php $ {
Root D:/wnmp/tczsslocal;
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fastcgi_param script_filename D:/wnmp/tczsslocal $ fastcgi_script_name;
Include fastcgi_params;
Include D:/wnmp/nginx-1.4.3/CONF/FastCGI. conf;
}
}
Nginx configuration Summary