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