Ticket #156: nginx.conf

File nginx.conf, 2.6 KB (added by Ben Maynard, 14 years ago)
Line 
1#######################################################################
2#
3# This is the main Nginx configuration file.
4#
5# More information about the configuration options is available on
6# * the English wiki - http://wiki.nginx.org/Main
7# * the Russian documentation - http://sysoev.ru/nginx/
8#
9#######################################################################
10
11#----------------------------------------------------------------------
12# Main Module - directives that cover basic functionality
13#
14# http://wiki.nginx.org/NginxHttpMainModule
15#
16#----------------------------------------------------------------------
17
18user nginx;
19worker_processes 2;
20worker_rlimit_nofile 32768;
21
22error_log /var/log/nginx/error.log;
23pid /var/run/nginx.pid;
24
25
26#----------------------------------------------------------------------
27# Events Module
28#
29# http://wiki.nginx.org/NginxHttpEventsModule
30#
31#----------------------------------------------------------------------
32
33events {
34 worker_connections 4096;
35 use epoll;
36}
37
38
39#----------------------------------------------------------------------
40# HTTP Core Module
41#
42# http://wiki.nginx.org/NginxHttpCoreModule
43#
44#----------------------------------------------------------------------
45
46http {
47 include /etc/nginx/mime.types;
48 default_type application/octet-stream;
49 sendfile on;
50 expires -1;
51 server_tokens off;
52 tcp_nopush on;
53 tcp_nodelay on;
54 client_max_body_size 50m;
55 server_names_hash_bucket_size 128;
56 server_names_hash_max_size 1024;
57 keepalive_timeout 65;
58 types_hash_max_size 2048;
59 server_name_in_redirect off
60
61 gzip on;
62 gzip_types application/x-javascript application/javascript text/xml text/css text/plain;
63 gzip_vary on;
64 gzip_proxied any;
65 gzip_disable "MSIE [1-6] \.";
66
67 log_format hostcombined '$server_name $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
68 access_log /var/log/nginx/access.log hostcombined;
69 error_log /var/log/nginx/error.log info;
70
71 upstream uwsgi_upstream {
72 server unix:/var/run/uwsgi/uwsgi.sock;
73 }
74
75 # Load config files from the /etc/nginx/conf.d directory
76 include /etc/nginx/conf.d/*.conf;
77 include /etc/nginx/sites-enabled/*.conf;
78}