nginx-configs/conf.d/00website.conf

167 lines
5.5 KiB
Plaintext

server {
listen 80;
listen [::]:80;
server_name verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p;
location /.well-known/matrix/server {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.server": "verndnomc4cnte4aw7yrfpse33vrw2nlwoxozxmf77zqquk6ea7q.b32.i2p:80"}';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "http://verndnomc4cnte4aw7yrfpse33vrw2nlwoxozxmf77zqquk6ea7q.b32.i2p"}}';
}
location /_matrix {
return 301 http://verndnomc4cnte4aw7yrfpse33vrw2nlwoxozxmf77zqquk6ea7q.b32.i2p$request_uri;
}
# subs_filter "wiki.vern.cc" "vernknid6kpyzaghegtnypzxe2nx643zrfc4jivh2tlna5m5jvcq.b32.i2p"
include common/website.conf;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p;
include snippets/lets-encrypt.conf;
include snippets/headers.conf;
location /.well-known/matrix/server {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.server": "verndnomc4cnte4aw7yrfpse33vrw2nlwoxozxmf77zqquk6ea7q.b32.i2p:80"}';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "https://verndnomc4cnte4aw7yrfpse33vrw2nlwoxozxmf77zqquk6ea7q.b32.i2p"}}';
}
# subs_filter "wiki.vern.cc" "vernknid6kpyzaghegtnypzxe2nx643zrfc4jivh2tlna5m5jvcq.b32.i2p"
include common/website.conf;
}
server {
listen 80;
listen [::]:80;
server_name vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion www.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
location /.well-known/matrix/server {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.server": "mtrx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion:80"}';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "http://mtrx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"}}';
}
location /_matrix {
return 301 http://mtrx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
}
subs_filter "wiki.vern.cc" "wiki.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion";
include common/website.conf;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion www.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
include snippets/lets-encrypt.conf;
include snippets/headers.conf;
location /.well-known/matrix/server {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.server": "mtrx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion:80"}';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "http://mtrx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"}}';
}
subs_filter "wiki.vern.cc" "wiki.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion";
include common/website.conf;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.vern.cc vern.cc;
include snippets/lets-encrypt.conf;
include snippets/headers.conf;
location /.well-known/matrix/server {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.server": "mtrx.vern.cc:443"}';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "https://mtrx.vern.cc"}, "m.identity_server": { "base_url": "https://vector.im" }}';
}
location /.well-known/host-meta {
default_type 'application/xrd+xml';
add_header Access-Control-Allow-Origin '*' always;
return 200 '<?xml version="1.0" encoding="UTF-8"?><XRD xmlns=\'http://docs.oasis-open.org/ns/xri/xrd-1.0\'><Link href=\'https://vern.cc:5281/http-bind\' rel=\'urn:xmpp:alt-connections:xbosh\'/><Link href=\'wss://vern.cc:5281/xmpp-websocket\' rel=\'urn:xmpp:alt-connections:websocket\'/></XRD>';
}
location /.well-known/host-meta.json {
default_type 'application/jrd+json';
add_header Access-Control-Allow-Origin '*' always;
return 200 '{"links":[{"rel":"urn:xmpp:alt-connections:xbosh","href":"https://vern.cc:5281/http-bind"},{"rel":"urn:xmpp:alt-connections:websocket","href":"wss://vern.cc:5281/xmpp-websocket"}]}';
}
include common/website.conf;
}
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
server_name www.vern.cc vern.cc;
}
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
include snippets/lets-encrypt.conf;
server_name stupid.vern.cc;
return 301 https://aryak.vern.cc$request_uri;
}
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
include snippets/lets-encrypt.conf;
server_name blog.vern.cc;
return 301 https://vern.cc/blog$request_uri;
}
server {
server_name blog.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
listen 80;
listen [::]:80;
return 301 http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/blog$request_uri;
add_header Onion-Location http://blog.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
}