-
Notifications
You must be signed in to change notification settings - Fork 0
/
earmilk.com.conf
96 lines (77 loc) · 2.41 KB
/
earmilk.com.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
server {
listen 192.168.102.1:80;
server_name www.earmilk.com;
return 301 $scheme://earmilk.com$request_uri;
}
server {
listen 192.168.102.1:80;
server_name earmilk.com mulwray.earmilk.com;
charset utf-8;
# access_log logs/host.access.log main;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
root /home/www-data/earmilk/public;
try_files $uri $uri/ /index.php?$args;
index index.php index.html index.htm;
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
# Include W3TC's editable nginx.conf file in WordPress root
# include /home/www-data/earmilk/public/nginx.conf;
location ~* \.(png|gif|jpg|jpeg)$ {
error_page 404 http://images.earmilk.com/delivery.png;
proxy_read_timeout 900s;
fastcgi_read_timeout 900s;
}
}
location /sxsw-2015 {
root /home/www-data/earmilk/public/microsites/sxsw-2015;
}
location ~ \.php$ {
root /home/www-data/earmilk/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
proxy_read_timeout 900s;
fastcgi_read_timeout 900s;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
#
# Error Handling
#
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# Security
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
# Block PHP files in uploads directory.
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
# Block PHP files in content directory.
location ~* /wp-content/.*\.php$ {
deny all;
}
# Block PHP files in includes directory.
location ~* /wp-includes/.*\.php$ {
deny all;
}
# Block PHP files in uploads, content, and includes directory.
location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ {
deny all;
}
}