-
Notifications
You must be signed in to change notification settings - Fork 316
/
nginx.conf
36 lines (29 loc) · 877 Bytes
/
nginx.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
client_max_body_size 500M;
real_ip_header X-Forwarded-For;
set_real_ip_from 10.0.0.0/8;
server_tokens off;
fastcgi_hide_header X-Powered-By;
fastcgi_hide_header X-Pingback;
add_header X-Frame-Options "SAMEORIGIN";
access_log off;
charset utf8;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_types *;
index index.php;
location ~ ~$ { return 404; }
location = /wp/xmlrpc.php { return 404; }
location = /wp/readme.html { return 404; }
location ^~ /app/uploads { }
# heroku-buildpack-php defines "location ~ \.php" rule for fcgi
set $expires 360;
if ($args) { set $expires max; }
location / {
expires $expires;
add_header Cache-Control "public";
try_files $uri $uri/ /index.php?$args;
}
# Needed by multi site
rewrite ^/(wp-.*.php)$ /wp/$1 last;
rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last;