比这篇新的文章: Codee#9302
比这篇旧的文章: pku3322

Codee#9301 编辑代码

语言: Nginx configuration file, 标签: 无  2010/02/09发布 1个月前更新 | 编辑代码
作者: , 点击60次, 评论(0), 收藏者(0), , 打分:

背景
主题: 字体:
Nginx configuration file语言: Codee#9301
001 #user  nobody;
002 worker_processes  1;
003
004 error_log  logs/error.log debug;
005 #error_log  logs/error.log  notice;
006 #error_log  logs/error.log  info;
007
008 #pid        logs/nginx.pid;
009 master_process  off;
010 daemon off;
011
012 events {
013     worker_connections  1024;
014 }
015
016
017 http {
018     include       mime.types;
019     default_type  application/octet-stream;
020
021     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
022     #                  '$status $body_bytes_sent "$http_referer" '
023     #                  '"$http_user_agent" "$http_x_forwarded_for"';
024
025     access_log  logs/access.log ;  
026
027     sendfile        on;
028     #tcp_nopush     on;
029
030     #keepalive_timeout  0;
031     keepalive_timeout  65;
032     #for error 502
033     large_client_header_buffers 4 32k;
034     proxy_next_upstream error timeout invalid_header http_500 http_503;
035     #gzip  on;
036     upstream wurmbai{
037         server  127.0.0.1:80;
038         server  127.0.0.1:3128;
039         hash $request_uri;
040         hash_again 2;
041     }
042
043     server {
044         listen       80;
045         server_name  localhost;
046
047         #charset koi8-r;
048
049         #access_log  logs/host.access.log  main;
050
051         location / {
052             root   html;
053             index  index.html index.htmi;
054             proxy_pass  http://wurmbai;
055         }
056
057         #error_page  404              /404.html;
058
059         # redirect server error pages to the static page /50x.html
060         #
061         error_page   500 502 503 504  /50x.html;
062         location = /50x.html {
063             root   html;
064         }
065
066         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
067         #
068         #location ~ \.php$ {
069         #    proxy_pass   http://127.0.0.1;
070         #}
071
072         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
073         #
074         #location ~ \.php$ {
075         #    root           html;
076         #    fastcgi_pass   127.0.0.1:9000;
077         #    fastcgi_index  index.php;
078         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
079         #    include        fastcgi_params;
080         #}
081
082         # deny access to .htaccess files, if Apache's document root
083         # concurs with nginx's one
084         #
085         #location ~ /\.ht {
086         #    deny  all;
087         #}
088     }
089
090
091     # another virtual host using mix of IP-, name-, and port-based configuration
092     #
093     #server {
094     #    listen       8000;
095     #    listen       somename:8080;
096     #    server_name  somename  alias  another.alias;
097
098     #    location / {
099     #        root   html;
100     #        index  index.html index.htm;
101     #    }
102     #}
103
104
105     # HTTPS server
106     #
107     #server {
108     #    listen       443;
109     #    server_name  localhost;
110
111     #    ssl                  on;
112     #    ssl_certificate      cert.pem;
113     #    ssl_certificate_key  cert.key;
114
115     #    ssl_session_timeout  5m;
116
117     #    ssl_protocols  SSLv2 SSLv3 TLSv1;
118     #    ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
119     #    ssl_prefer_server_ciphers   on;
120
121     #    location / {
122     #        root   html;
123     #        index  index.html index.htm;
124     #    }
125     #}
126
127 }


所有评论,共0条:( 我也来说两句)


发表评论

注册登录后再发表评论