Main repository for Devuan's www.devuan.org.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

105 lines
3.8 KiB

#
# beta.devuan.org
#
# Production version
#
server {
listen *:80;
server_name beta.devuan.org;
rewrite / https://$server_name$uri permanent;
}
server {
listen *:443 ssl;
server_name beta.devuan.org;
# Mirror example:
# server_name beta.devuan.org fr.devuan.org devuan.fr;
root /srv/beta.devuan.org/public;
# Old URLs
rewrite ^/communicate.*$ /os/debian-fork permanent;
rewrite ^/donate.*$ /os/donate permanent;
rewrite ^/files/devuan.mp3
/os/download/media/devuan.mp3 permanent;
rewrite ^/files/devuan.wav
/os/download/media/devuan.wav permanent;
rewrite ^/(Devuan_budget|devuan_financial_report_2014).pdf
/os/download/report/devuan_budget_2014.pdf permanent;
rewrite ^/devuan_financial_report_2015.pdf
/os/download/report/devuan_financial_report_2015.pdf permanent;
rewrite ^/newsletter_22dec.html
/os/debian-fork/newsletter-12014-12-22 permanent;
rewrite ^/pub.key /os/download/devuan-primary-signing-key.pub permanent;
# Old dismissed locations
# Mirror: comment out if that interferes with your site.
location ^/(css|img|js) { return 404; }
# Is this still needed?
location = /google1b5b85f34f8aa7f8.html {
echo "google-site-verification: google1b5b85f34f8aa7f8.html";
}
# Virtual /my Devuan
location /my {
set $gdo https://git.devuan.org;
set $tdo https://talk.devuan.org;
rewrite ^/my/dashboard $gdo/dashboard redirect;
rewrite ^/my/milestones $gdo/dashboard/milestones redirect;
rewrite ^/my/todo.* $gdo/dashboard/todos?state=pending redirect;
rewrite ^/my/activity $tdo/my/activity redirect;
rewrite ^/my/bookmarks $tdo/my/activity/bookmarks redirect;
rewrite ^/my/messages $tdo/my/messages redirect;
rewrite ^/my/preferences $tdo/my/preferences redirect;
rewrite ^/my/profile $tdo/my/profile redirect;
return 403;
}
# Localize error pages, English default
error_page 403 /en/error/403.html;
error_page 404 /en/error/404.html;
error_page 500 502 503 /en/error/50x.html;
location /en/error {
internal;
}
location ~ ^/(de|en|es|fr|it) {
try_files $uri $uri.html $uri/ =404;
error_page 403 /$1/error/403.html;
error_page 404 /$1/error/404.html;
error_page 501 502 503 /$1/error/50x.html;
}
# Links are made like this: /:locale/path
# But English is the default language so we skip /en
# MIRROR: you may want to switch to your language instead!
rewrite ^/en/(.*)$ /$1 last;
# rewrite ^/fr/(.*)$ /$1 last; # French mirror example
# TODO Add TLS configuration
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!RC4:!SRP:!DSS;
ssl_prefer_server_ciphers on;
ssl_session_cache builtin:1000 shared:SSL:10m;
# ssl_stapling on;
# ssl_stapling_verify on;
# resolver 8.8.8.8 valid=300s;
# resolver_timeout 5s;
ssl_certificate /srv/beta.devuan.org/etc/ssl/beta.crt.pem;
ssl_certificate_key /srv/beta.devuan.org/etc/ssl/beta.key.pem;
add_header X-Frame-Options SAMEORIGIN;
add_header Access-Control-Allow-Origin https://beta.devuan.org,https://talk.devuan.org,https://git.devuan.org,https://devuan.org;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
add_header X-Content-Security-Policy "default-src 'self'; script-src 'self'; img-src 'self'";
add_header X-Content-Type-Options nosniff;
location / {
try_files $uri $uri.html $uri/ =404;
}
access_log /var/log/nginx/beta.devuan.org_access.log;
error_log /var/log/nginx/beta.devuan.org_error.log;
}