This repository has been archived by the owner on May 2, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdomain-proxy.conf
69 lines (53 loc) · 1.92 KB
/
domain-proxy.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
64
65
66
67
68
69
# Actual site
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name sportaj.ga;
client_max_body_size 100M;
location / {
proxy_pass_request_headers on;
proxy_headers_hash_max_size 1024;
proxy_headers_hash_bucket_size 256;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
gzip_static on;
gunzip on;
proxy_pass http://10.10.10.107:8070;
}
gzip on;
gzip_types text/plain text/css application/javascript application/xml;
gzip_proxied no-cache no-store private expired auth;
gunzip on;
ssl on;
ssl_certificate /etc/cloudflare/sportaj.ga/fullchain.pem;
ssl_certificate_key /etc/cloudflare/sportaj.ga/privkey.pem;
}
# HTTPs redirect
server {
listen 80;
listen [::]:80;
server_name sportaj.ga;
return 301 https://sportaj.ga$request_uri;
}
# www redirect (HTTP)
server {
listen 80;
listen [::]:80;
server_name www.sportaj.ga;
return 301 https://sportaj.ga$request_uri;
}
# www redirect (HTTPS)
server {
server_name www.sportaj.ga;
return 301 https://sportaj.ga$request_uri;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl on;
ssl_certificate /etc/cloudflare/sportaj.ga/fullchain.pem;
ssl_certificate_key /etc/cloudflare/sportaj.ga/privkey.pem;
}