#文件 D:/nginx/vhost/xxx.com.confserver{ Listen; server_name xxx.com; Location/ { Rootd:/xxx.com; Indexindex.html index.htm index.php; } #error_page 404/404.html;# REDIRECT Server error pages to the static page/50x.html # Error_page502 503 504/50x.html; Location =/50x.html { Roothtml; } # Proxy The PHP scripts to Apache listening on 127.0.0.1:80 ##location ~ \.php$ {# Proxy_pass http://127.0.0.1; #}# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # Location~ \.php$ { Rootd:/xxx.com; Fastcgi_pass127.0.0.1:9000; Fastcgi_indexindex.php; Fastcgi_paramscript_filename $document _root$fastcgi_script_name; includeFastcgi_params; } }#文件 d:/nginx/conf/nginx.conf#user Nobody;worker_processes1;#error_log Logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;Events{ worker_connections1024x768;}http{ includemime.types; Default_typeApplication/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; Sendfileon ; #tcp_nopush on;#keepalive_timeout 0; Keepalive_timeout; gzipon ; include.. /vhost/*.conf; # Another virtual host using mix of ip-, name-, and port-based configuration ##server {# Listen 8000;# listen somename:8080;# server_name Somename alias Another.alias;# location/{# root HTML;# index index.html index.htm; # } #}# HTTPS Server ##server {# Listen 443 SSL;# server_name localhost;# ssl_certificate Cert.pem;# Ssl_certificate_key Cert.key;# Ssl_session_cache shared:ssl:1m;# ssl_session_timeout 5m;# ssl_ciphers high:!anull:! MD5;# ssl_prefer_server_ciphers on;# location/{# root HTML;# index index.html index.htm; # } #}}
#by [email protected]
Nginx Win7 vhost multi-domain rewrite!