Ticket #687: nginx.conf

File nginx.conf, 1.5 KB (added by Michael Bonfils, 12 years ago)

Nginx configuration

Line 
1worker_processes 1;
2
3pid /var/run/nginx.pid;
4lock_file /run/lock/nginx.lock;
5
6events {
7 worker_connections 4096;
8}
9
10
11
12http {
13
14 #proxy_temp_path /dev/shm/proxy_temp 1 2;
15 #fastcgi_temp_path /dev/shm/fastcgi_temp 1 2;
16 #proxy_cache_path /dev/shm/nginx/ levels=1:2 keys_zone=default:10m inactive=24h max_size=10m;
17
18
19 log_format timed_combined '$remote_addr - $remote_user [$time_local] '
20 '"$request" $status $body_bytes_sent '
21 '"$http_referer" "$http_user_agent" '
22 '$request_time $upstream_response_time $pipe';
23 access_log /var/log/nginx/access.log timed_combined;
24 error_log /var/log/nginx/error.log debug;
25 server_tokens off;
26 include /etc/nginx/mime.types;
27 default_type application/octet-stream;
28
29 sendfile on;
30 tcp_nopush on;
31 tcp_nodelay on;
32 keepalive_timeout 30;
33 keepalive_requests 100000;
34 client_body_buffer_size 100000k;
35 client_max_body_size 0;
36
37 upstream roundrobin {
38 server 127.0.0.1:1039;
39 keepalive 500;
40 }
41 server {
42 listen 80;
43 server_name sitename.com;
44 root /var/www/;
45
46 #add_header X-Fastcgi-Cache $upstream_cache_status;
47
48 location / {
49 fastcgi_cache_bypass 1;
50 fastcgi_no_cache 1;
51 fastcgi_buffering off ;
52 fastcgi_keep_conn on;
53 include fastcgi_params;
54 fastcgi_pass roundrobin;
55 fastcgi_next_upstream error timeout;
56 fastcgi_read_timeout 300;
57 }
58 }
59}