|
|
@@ -1,6 +1,6 @@
|
|
1
|
1
|
# Upstream sites for proxy-ing
|
|
2
|
2
|
upstream wp {
|
|
3
|
|
- server <YOUR_SERVER_IP_ADDRESS>:8082;
|
|
|
3
|
+ server <YOUR_DOCKER_CONTAINER_NAME>;
|
|
4
|
4
|
}
|
|
5
|
5
|
|
|
6
|
6
|
### Redirect regular traffic to SSL
|
|
|
@@ -10,13 +10,6 @@ server {
|
|
10
|
10
|
|
|
11
|
11
|
server_name <CHANGE_ME> www.<CHANGE_ME>;
|
|
12
|
12
|
|
|
13
|
|
- # return 301 https://$host$request_uri;
|
|
14
|
|
-
|
|
15
|
|
- # root /opt/app/public/;
|
|
16
|
|
- # WP Test
|
|
17
|
|
- root /var/www/html;
|
|
18
|
|
- index index.html index.htm index.php index.nginx-debian.html;
|
|
19
|
|
-
|
|
20
|
13
|
location / {
|
|
21
|
14
|
proxy_set_header Host $host;
|
|
22
|
15
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
@@ -37,15 +30,11 @@ server {
|
|
37
|
30
|
|
|
38
|
31
|
include snippets/letsencrypt.conf;
|
|
39
|
32
|
include snippets/ssl-params.conf;
|
|
40
|
|
-
|
|
41
|
|
- root /var/www/html;
|
|
42
|
|
- index index.html index.htm index.php index.nginx-debian.html;
|
|
43
|
|
-
|
|
44
|
|
- # location / {
|
|
45
|
|
- # try_files $uri $uri/ /index.php;
|
|
46
|
|
- # }
|
|
47
|
|
-
|
|
|
33
|
+
|
|
48
|
34
|
location / {
|
|
|
35
|
+ #blocks blank user_agents
|
|
|
36
|
+ if ($http_user_agent = "") { return 301 $scheme://www.google.com/; }
|
|
|
37
|
+
|
|
49
|
38
|
proxy_set_header Host $host;
|
|
50
|
39
|
proxy_set_header X-Real-IP $remote_addr;
|
|
51
|
40
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
@@ -53,11 +42,15 @@ server {
|
|
53
|
42
|
proxy_set_header Accept-Encoding "";
|
|
54
|
43
|
proxy_set_header Proxy "";
|
|
55
|
44
|
|
|
56
|
|
- proxy_pass http://wp;
|
|
57
|
|
- proxy_redirect off;
|
|
|
45
|
+ proxy_pass http://wp;
|
|
|
46
|
+ proxy_redirect off;
|
|
|
47
|
+
|
|
|
48
|
+ proxy_connect_timeout 300;
|
|
|
49
|
+ proxy_send_timeout 300;
|
|
|
50
|
+ proxy_read_timeout 300;
|
|
58
|
51
|
}
|
|
59
|
52
|
|
|
60
|
53
|
location ~/\.ht {
|
|
61
|
54
|
deny all;
|
|
62
|
55
|
}
|
|
63
|
|
-}
|
|
|
56
|
+}
|