-
Notifications
You must be signed in to change notification settings - Fork 0
/
.nginx-wordpress.conf
63 lines (51 loc) · 1.48 KB
/
.nginx-wordpress.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
# WordPress single site rules.
# Designed to be included in any server {} block.
server {
listen 80 default_server;
listen 443 ssl;
server_name appserver;
ssl_certificate /certs/cert.crt;
ssl_certificate_key /certs/cert.key;
ssl_verify_client off;
port_in_redirect off;
client_max_body_size 100M;
## Your only path reference.
root {{LANDO_WEBROOT}};
## This should be in your http block and if it is, it's not needed here.
index index.php;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_pass fpm:9000;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 3000s;
fastcgi_send_timeout 3000s;
fastcgi_read_timeout 3000s;
}
location ~* \.(png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
location ~* \.(js|css)$ {
expires -1;
log_not_found off;
}
}