diff --git a/madone/docker/nginx/launch.sh b/madone/docker/nginx/launch.sh index a3f0a2e..0664e08 100755 --- a/madone/docker/nginx/launch.sh +++ b/madone/docker/nginx/launch.sh @@ -10,7 +10,7 @@ docker run \ --env URL=seaturtle.pw \ --env ONLY_SUBDOMAINS=true \ --env SUBDOMAINS=madone \ - --env EXTRA_DOMAINS=paul.walko.org,walko.org \ + --env EXTRA_DOMAINS=paul.walko.org,paul.walko.org,walko.org,www.walko.org \ --env VALIDATION=html \ --env TZ=US/Eastern \ --volume $PWD/nginx-config:/config:rw \ diff --git a/madone/docker/nginx/site-confs/madone.seaturtle.pw.enabled b/madone/docker/nginx/site-confs/madone.seaturtle.pw.enabled index 131bc56..47fcfc0 100644 --- a/madone/docker/nginx/site-confs/madone.seaturtle.pw.enabled +++ b/madone/docker/nginx/site-confs/madone.seaturtle.pw.enabled @@ -16,6 +16,12 @@ server { client_max_body_size 1M; + # Purposefully do not proxy main site because there's no reason somone + # should be using this domain name + location / { + return 301 https://example.com; + } + # Proxy syncthing location /syncthing/ { auth_basic "not today buddy"; diff --git a/madone/docker/nginx/site-confs/paul.walko.org.enabled b/madone/docker/nginx/site-confs/paul.walko.org.enabled new file mode 100644 index 0000000..aa0db58 --- /dev/null +++ b/madone/docker/nginx/site-confs/paul.walko.org.enabled @@ -0,0 +1,23 @@ +server { + listen 80; + listen [::]:80; + server_name paul.walko.org; + + return 301 https://paul.walko.org$request_uri; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name paul.walko.org; + + # ssl conf + include /config/nginx/ssl.conf; + + client_max_body_size 1M; + + # Proxy main site + location / { + proxy_pass https://paulwalko.github.io; + } +} diff --git a/madone/docker/nginx/site-confs/walko.org.enabled b/madone/docker/nginx/site-confs/walko.org.enabled new file mode 100644 index 0000000..97fc6c8 --- /dev/null +++ b/madone/docker/nginx/site-confs/walko.org.enabled @@ -0,0 +1,34 @@ +server { + listen 80; + listen [::]:80; + server_name walko.org www.walko.org; + + return 301 https://walko.org$request_uri; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name www.walko.org; + + # ssl conf + include /config/nginx/ssl.conf; + + return 301 https://walko.org$request_uri; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name walko.org; + + # ssl conf + include /config/nginx/ssl.conf; + + client_max_body_size 1M; + + # Proxy main site + location / { + proxy_pass https://paulwalko.github.io; + } +}