nginx-configs/common/mirror.conf

38 lines
2.8 KiB
Plaintext

add_header Onion-Location http://mirror.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
add_header X-I2P-Location http://vernxqcyexg5qsmtel4fjs7f7o6uktrqwuhqc4dde4xf2l5v55aq.b32.i2p$request_uri;
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;
fancyindex_exact_size off;
fancyindex_default_sort date_desc;
fancyindex_time_format "%a, %e %B %Y %I:%M:%S %p";
subs_filter "body,html {background:#fff;font-family:\"Bitstream Vera Sans\",\"Lucida Grande\",\"Lucida Sans Unicode\",Lucidux,Verdana,Lucida,sans-serif;}tr:nth-child(even) {background:#f4f4f4;}th,td {padding:0.1em 0.5em;}th {text-align:left;font-weight:bold;background:#eee;border-bottom:1px solid #aaa;}#list {border:1px solid #aaa;width:100%;}a {color:#a33;}a:hover {color:#e33;}" "";
}
location /gnu {
add_before_body /gnu.html;
fancyindex on;
fancyindex_exact_size off;
fancyindex_default_sort date_desc;
fancyindex_time_format "%a, %e %B %Y %I:%M:%S %p";
subs_filter "body,html {background:#fff;font-family:\"Bitstream Vera Sans\",\"Lucida Grande\",\"Lucida Sans Unicode\",Lucidux,Verdana,Lucida,sans-serif;}tr:nth-child(even) {background:#f4f4f4;}th,td {padding:0.1em 0.5em;}th {text-align:left;font-weight:bold;background:#eee;border-bottom:1px solid #aaa;}#list {border:1px solid #aaa;width:100%;}a {color:#a33;}a:hover {color:#e33;}" "";
}
if ($badagent) {
return 403;
}