-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.nginx
181 lines (159 loc) · 6.12 KB
/
main.nginx
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# voxelfox.co.uk
server {
server_name voxelfox.co.uk www.voxelfox.co.uk;
if ($host = "www.voxelfox.co.uk") {
return 301 http://voxelfox.co.uk;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8000;
add_header 'Access-Control-Allow-Origin' '*';
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk-0002/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk-0002/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# applepy.voxelfox.co.uk
server {
server_name applepy.voxelfox.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8001;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# flower.voxelfox.co.uk
server {
server_name flower.voxelfox.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8002;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# gardendale.voxelfox.co.uk
server {
server_name gardendale.voxelfox.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8003;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# profile.voxelfox.co.uk
server {
server_name profile.voxelfox.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8004;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# uoesu.voxelfox.co.uk
server {
server_name uoesu.voxelfox.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8005;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# interactions.voxelfox.co.uk
server {
server_name interactions.voxelfox.co.uk;
location /wordy/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8006/;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk-0001/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# cerberus.voxelfox.co.uk
server {
server_name cerberus.voxelfox.co.uk;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8007/;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk-0003/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk-0003/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# vfl.gg
server {
server_name
*.vfl.gg
vfl.gg
twitter.vfl.gg
twitch.vfl.gg
discord.vfl.gg
applepy.vfl.gg
flower.vfl.gg
;
set $subdomain "";
if ($host ~ "^(.*)\.vfl\.gg$") { set $subdomain $1; }
if ($subdomain = "") {
return 301 https://voxelfox.co.uk;
}
if ($subdomain = "twitter") {
return 301 https://twitter.com/VoxelFoxKae;
}
if ($subdomain = "discord") {
return 301 https://discord.gg/vfl;
}
if ($subdomain = "twitch") {
return 301 https://twitch.tv/VoxelFoxKae;
}
return 301 https://$subdomain.voxelfox.co.uk;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/voxelfox.co.uk-0002/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/voxelfox.co.uk-0002/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# HTTPS redirect
server {
server_name
*.voxelfox.co.uk
voxelfox.co.uk
*.vfl.gg
vfl.gg
;
return 301 https://$host$request_uri;
listen 80;
}