|
|
@@ -13,17 +13,7 @@ server {
|
|
13
|
13
|
|
|
14
|
14
|
server_name freehand.com www.freehand.com;
|
|
15
|
15
|
|
|
16
|
|
- index index.html index.html index.php;
|
|
17
|
|
-
|
|
18
|
|
- location / {
|
|
19
|
|
- proxy_set_header Host $host;
|
|
20
|
|
- proxy_set_header X-Real-IP $remote_addr;
|
|
21
|
|
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
22
|
|
- proxy_set_header X-Forwarded-Proto $scheme;
|
|
23
|
|
-
|
|
24
|
|
- proxy_pass http://freehand;
|
|
25
|
|
- proxy_redirect off;
|
|
26
|
|
- }
|
|
|
16
|
+ return 301 https://$host$request_uri;
|
|
27
|
17
|
}
|
|
28
|
18
|
### SSL Stuff
|
|
29
|
19
|
server {
|
|
|
@@ -39,15 +29,25 @@ server {
|
|
39
|
29
|
index index.html index.htm index.php index.nginx-debian.html;
|
|
40
|
30
|
|
|
41
|
31
|
location / {
|
|
42
|
|
- proxy_set_header Host $host;
|
|
43
|
|
- proxy_set_header X-Real-IP $remote_addr;
|
|
44
|
|
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
45
|
|
- proxy_set_header X-Forwarded-Proto $scheme;
|
|
46
|
|
- proxy_set_header Accept-Encoding "";
|
|
47
|
|
- proxy_set_header Proxy "";
|
|
48
|
|
-
|
|
49
|
|
- proxy_pass http://freehand;
|
|
50
|
|
- proxy_redirect off;
|
|
|
32
|
+ #blocks blank user_agents
|
|
|
33
|
+ if ($http_user_agent = "") { return 301 $scheme://www.google.com/; }
|
|
|
34
|
+
|
|
|
35
|
+ proxy_set_header Host $host;
|
|
|
36
|
+ proxy_set_header X-Forwarded-Host $host;
|
|
|
37
|
+ proxy_set_header X-Forwarded-Server $host;
|
|
|
38
|
+ proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
39
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
40
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
41
|
+ proxy_set_header Accept-Encoding "";
|
|
|
42
|
+ proxy_set_header Proxy "";
|
|
|
43
|
+
|
|
|
44
|
+ proxy_pass_request_headers on;
|
|
|
45
|
+ proxy_pass http://freehand;
|
|
|
46
|
+ proxy_redirect off;
|
|
|
47
|
+
|
|
|
48
|
+ proxy_connect_timeout 300;
|
|
|
49
|
+ proxy_send_timeout 300;
|
|
|
50
|
+ proxy_read_timeout 300;
|
|
51
|
51
|
}
|
|
52
|
52
|
|
|
53
|
53
|
location ~/\.ht {
|
|
|
@@ -63,22 +63,8 @@ server {
|
|
63
|
63
|
|
|
64
|
64
|
server_name craftinamerica.org www.craftinamerica.org;
|
|
65
|
65
|
|
|
66
|
|
- # return 302 https://$host$request_uri;
|
|
67
|
|
-
|
|
68
|
|
- # WP
|
|
69
|
|
- index index.html index.htm index.php index.nginx-debian.html;
|
|
70
|
|
-
|
|
71
|
|
- location / {
|
|
72
|
|
- proxy_set_header Host $host;
|
|
73
|
|
- proxy_set_header X-Real-IP $remote_addr;
|
|
74
|
|
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
75
|
|
- proxy_set_header X-Forwarded-Proto $scheme;
|
|
76
|
|
-
|
|
77
|
|
- proxy_pass http://craft;
|
|
78
|
|
- proxy_redirect off;
|
|
79
|
|
- }
|
|
|
66
|
+ return 301 https://$host$request_uri;
|
|
80
|
67
|
}
|
|
81
|
|
-
|
|
82
|
68
|
### SSL Stuff
|
|
83
|
69
|
server {
|
|
84
|
70
|
listen 443 ssl http2;
|
|
|
@@ -93,6 +79,9 @@ server {
|
|
93
|
79
|
index index.html index.htm index.php index.nginx-debian.html;
|
|
94
|
80
|
|
|
95
|
81
|
location / {
|
|
|
82
|
+ #blocks blank user_agents
|
|
|
83
|
+ if ($http_user_agent = "") { return 301 $scheme://www.google.com/; }
|
|
|
84
|
+
|
|
96
|
85
|
proxy_set_header Host $host;
|
|
97
|
86
|
proxy_set_header X-Real-IP $remote_addr;
|
|
98
|
87
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|