1
|
# http://tutspundit.com/how-to-install-nginx-php-fpm-mysql-php533-wordpress-part-2/
|
2
|
|
3
|
user www-data;
|
4
|
worker_processes 4;
|
5
|
worker_rlimit_nofile 32768;
|
6
|
|
7
|
# debug, info, notice, warn, error, and crit (default is error)
|
8
|
error_log /var/log/nginx/error.log warn;
|
9
|
pid /var/run/nginx.pid;
|
10
|
|
11
|
events {
|
12
|
worker_connections 4096;
|
13
|
multi_accept on;
|
14
|
accept_mutex_delay 50ms;
|
15
|
}
|
16
|
|
17
|
|
18
|
http {
|
19
|
include /etc/nginx/mime.types;
|
20
|
|
21
|
# http://wiki.nginx.org/NginxHttpSslModule
|
22
|
# http://wiki.nginx.org/NginxHttpMainModule
|
23
|
|
24
|
# log_format combined '$remote_addr - $remote_user [$time_local] '
|
25
|
# '"$request" $status $body_bytes_sent '
|
26
|
# '"$http_referer" "$http_user_agent"';
|
27
|
|
28
|
log_format vhost_combined '$server_name $remote_addr - $remote_user [$time_local] '
|
29
|
'"$request" $status $bytes_sent '
|
30
|
'"$http_referer" "$http_user_agent"';
|
31
|
|
32
|
log_format vhost_combined_ssl '$server_name $remote_addr - $remote_user [$time_local] '
|
33
|
'"$request" $status $bytes_sent '
|
34
|
'"$http_referer" "$http_user_agent" $ssl_protocol $ssl_cipher';
|
35
|
|
36
|
log_format vhost_combined_debugging '$server_name $remote_addr - $remote_user [$time_local] '
|
37
|
'"(request = \'$request\')" $status $bytes_sent '
|
38
|
'(request_filename = \'$request_filename\') $request_uri (args = \'$args\') '
|
39
|
'"$http_referer" "$http_user_agent"';
|
40
|
|
41
|
|
42
|
# http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#logformat
|
43
|
# LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{SSL_PROTOCOL}x %{SSL_CIPHER}x" vhost-ssl
|
44
|
# LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
45
|
# LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost
|
46
|
# LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
47
|
|
48
|
# Note: Allowing all logs to combine as we'll end up splitting them later.
|
49
|
access_log /var/log/nginx/access.log vhost_combined;
|
50
|
|
51
|
# Logging SSL connections and their types (useful for debugging)
|
52
|
access_log /var/log/nginx/ssl.access.log vhost_combined_ssl;
|
53
|
|
54
|
sendfile on;
|
55
|
#tcp_nopush on;
|
56
|
|
57
|
#keepalive_timeout 0;
|
58
|
|
59
|
keepalive_timeout 65;
|
60
|
tcp_nodelay on;
|
61
|
expires max;
|
62
|
server_tokens off;
|
63
|
gzip on;
|
64
|
gzip_static on;
|
65
|
gzip_proxied any;
|
66
|
gzip_types text/plain text/css application/x-javascript text/xml text/javascript application/xml;
|
67
|
gzip_vary on;
|
68
|
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
69
|
|
70
|
include /etc/nginx/conf.d/*.conf;
|
71
|
include /etc/nginx/sites-enabled/*;
|
72
|
}
|