nonozone
2012-05-11 17:40:41 +08:00
nginx配置如下:
2 user nginx;
3 worker_processes 50;
4
5 error_log /var/log/nginx/error.log warn;
6 pid /var/run/nginx.pid;
7
8
9 events {
10 worker_connections 1024;
11 }
12
13
14 http {
15 include /etc/nginx/mime.types;
16 default_type application/octet-stream;
17
18 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
19 '$status $body_bytes_sent "$http_referer" '
20 '"$http_user_agent" "$http_x_forwarded_for"';
21
22 access_log /var/log/nginx/access.log main;
23
24 sendfile on;
25 #tcp_nopush on;
26 autoindex off;
27 map $scheme $fastcgi_https { ## Detect when HTTPS is used
28 default off;
29 https on;
30 }
31
32 keepalive_timeout 60;
33
34 gzip on;
35 gzip_comp_level 2;
36 gzip_proxied any;
37 gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
38
39
40 include /etc/nginx/conf.d/*.conf;
41 }
~