Move mirror nav/css to return 200 + add extra whoogle subdom

This commit is contained in:
root 2022-09-22 12:25:43 -04:00
parent 42873c173c
commit 3f2c0a5ebf
5 changed files with 41 additions and 10 deletions

View File

@ -2,6 +2,18 @@ add_header Onion-Location http://mirror.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5
root /var/mirror;
ssi on;
location /style.css {
return 200 '@font-face { font-family: Fira Code; font-style: normal; font-weight: 400; src: url(/woff2/FiraCodeLatinExt.woff2) format(woff2); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: Fira Code; font-style: normal; font-weight: 400; src: url(/woff2/FiraCodeLatin.woff2) format(woff2); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } body { font-family:Fira Code; margin:20px auto; max-width:800px; line-height:1.5em; font-size:1.1em; background-color:#282c34; color:#bbc2cf; padding:0 10px; hyphens:auto; } header { display:flex; justify-content:space-between; align-items:center; white-space:nowrap; } nav { display:inline-block; } nav li { display:inline-block no; margin-right:20px; } .navlogo { width:50px; height:50px; } a { color:#ff6c6b; text-decoration:none; } a:hover { color:#ff6c6b; text-decoration:underline; } h1, h2, h3 { display:inline; line-height:1.2; color:#51afef; font-size:1.3em; } h2 { font-size:1.2em; } h3 { font-size:1.1em; }';
}
location /gnu.html {
return 200 "<link rel=stylesheet href='/style.css'><header><center><p>~vern's GNU mirror</p></center></header><hr>";
}
location /favicon.ico {
alias /var/www/website/favicon.ico;
}
location / {
add_before_body /nav.html;
fancyindex on;

View File

@ -1,9 +1,10 @@
add_header Onion-Location http://whoogle.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
location / {
proxy_pass https://wg.vern.cc/;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host; # so Whoogle knows domain
proxy_http_version 1.1; # to keep alive
proxy_set_header Connection ""; # to keep alive
proxy_pass https://whoogle.vern.cc/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cookie_path / "/; Secure; HttpOnly; SameSite=lax";
}

View File

@ -4,6 +4,10 @@ server {
server_name mirror.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion mirrors.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
location /nav.html {
return 200 '<link rel=stylesheet href="/style.css"><header><a href="http://mirror.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"><img src="http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/media/vern.png" alt="home" class="navlogo"></a><nav><a href="http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/privpol">PrivacyPolicy</a> <a href="http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/donations">Donate</a></nav></header><hr>';
}
include common/mirror.conf;
}
@ -13,6 +17,10 @@ server {
server_name vernxqcyexg5qsmtel4fjs7f7o6uktrqwuhqc4dde4xf2l5v55aq.b32.i2p;
location /nav.html {
return 200 '<link rel=stylesheet href="/style.css"><header><a href="http://vernxqcyexg5qsmtel4fjs7f7o6uktrqwuhqc4dde4xf2l5v55aq.b32.i2p"><img src="http://verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p/media/vern.png" alt="home" class="navlogo"></a><nav><a href="http://verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p/privpol">PrivacyPolicy</a> <a href="http://verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p/donations">Donate</a></nav></header><hr>';
}
include common/mirror.conf;
}
@ -23,8 +31,13 @@ server {
include snippets/headers.conf;
server_name mirror.vern.cc mirrors.vern.cc;
location /nav.html {
return 200 '<link rel=stylesheet href="/style.css"><header><a href="//mirror.vern.cc"><img src="//vern.cc/media/vern.png" alt="home" class="navlogo"></a><nav><a href="//vern.cc/privpol">PrivacyPolicy</a> <a href="//vern.cc/donations">Donate</a></nav></header><hr>';
}
include common/mirror.conf;
}
server {
listen 80;
listen [::]:80;

View File

@ -15,6 +15,11 @@ server {
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;
}
@ -59,6 +64,10 @@ server {
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;

View File

@ -1,17 +1,13 @@
server {
listen 80;
listen [::]:80;
server_name whoogle.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
server_name whoogle.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion wg.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
include common/whoogle.conf;
}
server {
listen 11018;
listen [::]:11018;
server_name verneks7rfjptpz5fpii7n7nrxilsidi2qxepeuuf66c3tsf4nhq.b32.i2p;
include common/whoogle.conf;
}