136 lines
2.8 KiB
Plaintext
136 lines
2.8 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name www.grapheneos.org grapheneos.org;
|
|
|
|
root /var/empty;
|
|
|
|
return 301 https://grapheneos.org$request_uri;
|
|
}
|
|
|
|
server {
|
|
include /etc/nginx/snippets/https.conf;
|
|
server_name www.grapheneos.org;
|
|
|
|
root /var/empty;
|
|
|
|
return 301 https://grapheneos.org$request_uri;
|
|
}
|
|
|
|
server {
|
|
include /etc/nginx/snippets/https.conf;
|
|
server_name grapheneos.org;
|
|
|
|
root /var/www/html;
|
|
|
|
charset utf-8;
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
gzip_static on;
|
|
|
|
if ($request_uri ~ ^/(.*)\.html$) {
|
|
return 301 /$1;
|
|
}
|
|
|
|
if ($request_uri ~ ^(.*)/index$) {
|
|
return 301 $1/;
|
|
}
|
|
|
|
location = /security.txt {
|
|
return 301 /.well-known/security.txt;
|
|
}
|
|
|
|
location = /graphene.png {
|
|
return 301 /logo.png;
|
|
}
|
|
|
|
location = /pdfviewer_privacy_policy {
|
|
return 301 /pdfviewer-privacy-policy;
|
|
}
|
|
|
|
location = /safari_pinned_tab_icon.svg {
|
|
return 301 /mask-icon.svg;
|
|
}
|
|
|
|
location = /safari-pinned-tab-icon.svg {
|
|
return 301 /mask-icon.svg;
|
|
}
|
|
|
|
location = /bitcoin_address.png {
|
|
return 301 /bitcoin-address.png;
|
|
}
|
|
|
|
location = /LICENSE {
|
|
default_type text/plain;
|
|
}
|
|
|
|
location ~ "\.(ico|webmanifest)$" {
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
add_header Cache-Control "public, max-age=604800";
|
|
}
|
|
|
|
location ~ "\.(css|js|svg)$" {
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
add_header Cache-Control "public, max-age=31536000";
|
|
}
|
|
|
|
location ~ "\.(png|woff2)$" {
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
add_header Cache-Control "public, max-age=31536000";
|
|
gzip_static off;
|
|
}
|
|
|
|
location / {
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
add_header Cache-Control "public, max-age=1800";
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name connectivitycheck.grapheneos.org;
|
|
|
|
root /var/empty;
|
|
|
|
location = /generate_204 {
|
|
return 204;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://connectivitycheck.grapheneos.org$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
include /etc/nginx/snippets/https.conf;
|
|
server_name connectivitycheck.grapheneos.org;
|
|
|
|
root /var/empty;
|
|
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
|
|
location = /generate_204 {
|
|
return 204;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name mta-sts.grapheneos.org;
|
|
|
|
root /var/empty;
|
|
|
|
return 301 https://mta-sts.grapheneos.org$request_uri;
|
|
}
|
|
|
|
server {
|
|
include /etc/nginx/snippets/https.conf;
|
|
server_name mta-sts.grapheneos.org;
|
|
|
|
root /var/www/mta-sts;
|
|
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
}
|