64 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-08-01 14:49:47 +02:00
server {
listen 80;
2022-01-05 15:43:39 +01:00
listen [::]:80;
2021-08-01 14:49:47 +02:00
server_name element.envs.net;
location / {
return 302 https://$host$request_uri;
}
location /.well-known/acme-challenge/ {
alias /var/lib/letsencrypt/.well-known/acme-challenge/;
}
}
server {
listen 443 ssl http2;
2022-01-05 15:43:39 +01:00
listen [::]:443 ssl http2;
2021-08-01 14:49:47 +02:00
server_name element.envs.net;
include snippets/ssl.conf;
root /opt/Riot/resources/webapp/;
index index.html;
2022-01-09 12:46:03 +01:00
location = /index.html {
add_header Cache-Control "no-cache";
}
2022-06-14 21:06:03 +02:00
location = /version {
add_header Cache-Control "no-cache";
add_header Content-Type text/plain;
}
# covers config.json and config.hostname.json requests as it is prefix.
location /config {
add_header Cache-Control "no-cache";
add_header Content-Type application/json;
}
2021-08-01 14:49:47 +02:00
}
2022-03-08 16:24:25 +01:00
#ALIAS
2021-08-01 14:49:47 +02:00
server {
listen 80;
2022-01-05 15:43:39 +01:00
listen [::]:80;
2021-08-01 14:49:47 +02:00
server_name riot.envs.net;
location / {
return 302 https://element.envs.net$request_uri;
}
location /.well-known/acme-challenge/ {
alias /var/lib/letsencrypt/.well-known/acme-challenge/;
}
}
server {
listen 443 ssl http2;
2022-01-05 15:43:39 +01:00
listen [::]:443 ssl http2;
2021-08-01 14:49:47 +02:00
server_name riot.envs.net;
include snippets/ssl.conf;
return 302 https://element.envs.net$request_uri;
}