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.

191 lines
4.4 KiB

worker_processes 2;
events {
worker_connections 1024;
}
http {
# Some SSL stuff
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256;
ssl_prefer_server_ciphers on;
# Some global configurations
client_max_body_size 10M;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
# header crap
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer" always;
# erg.. fix this eventually.
add_header Content-Security-Policy 'self' always;
# http://ja13.org and https://ja13.org
server {
server_name ja13.org;
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /srv/http/http;
ssl_certificate /etc/letsencrypt/live/ja13.org-0001/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ja13.org-0001/privkey.pem;
location / {
index index.html;
autoindex on;
}
location /robots.txt {
root /srv/http/common;
index robots.txt;
}
location /favicon.ico {
root /srv/http/common;
index favicon.ico;
}
location /resume.pdf {
root /srv/http/resume;
index resume.pdf;
}
}
# http://john.ja13.org and https://john.ja13.org
server {
server_name john.ja13.org;
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /srv/http/john;
allow 10.0.0.0/24;
deny all;
ssl_certificate /etc/letsencrypt/live/ja13.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ja13.org/privkey.pem;
location / {
proxy_pass http://10.0.0.4;
}
}
# http://ns1.ja13.org and https://ns1.ja13.org
server {
server_name ns1.ja13.org;
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /srv/http/ns1;
ssl_certificate /etc/letsencrypt/live/ja13.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ja13.org/privkey.pem;
location / {
index index.html;
autoindex on;
}
location /robots.txt {
root /srv/http/common;
index robots.txt;
}
location /favicon.ico {
root /srv/http/common;
index favicon.ico;
}
}
# http://wifi.ja13.org and https://wifi.ja13.org
server {
server_name wifi.ja13.org;
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /srv/http;
allow 10.0.0.0/24;
deny all;
ssl_certificate /etc/letsencrypt/live/ja13.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ja13.org/privkey.pem;
location / {
proxy_set_header Referer "";
proxy_ssl_verify off;
proxy_pass https://127.0.0.1:8443;
}
}
# http://resume.ja13.org and https://resume.ja13.org
server {
server_name resume.ja13.org;
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /srv/http/resume;
ssl_certificate /etc/letsencrypt/live/ja13.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ja13.org/privkey.pem;
location / {
index index.html;
autoindex on;
}
location /robots.txt {
root /srv/http/common;
index robots.txt;
}
location /favicon.ico {
root /srv/http/common;
index favicon.ico;
}
}
# http://*.ja13.org and https://*.ja13.org (a catch all domain)
server {
server_name _;
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
root /srv/http/lost;
ssl_certificate /etc/letsencrypt/live/ja13.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ja13.org/privkey.pem;
location / {
index index.html;
autoindex on;
}
location /robots.txt {
root /srv/http/common;
index robots.txt;
}
location /favicon.ico {
root /srv/http/common;
index favicon.ico;
}
location /resume.pdf {
root /srv/http/resume;
index resume.pdf;
}
}
}