diff --git a/madone/docker/nginx/site-confs/madone.seaturtle.pw.enabled b/madone/docker/nginx/default similarity index 69% rename from madone/docker/nginx/site-confs/madone.seaturtle.pw.enabled rename to madone/docker/nginx/default index 65e2d83..b9f8852 100644 --- a/madone/docker/nginx/site-confs/madone.seaturtle.pw.enabled +++ b/madone/docker/nginx/default @@ -1,3 +1,7 @@ +## Based on version below; heavily modified for me +## Version 2018/09/12 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default + +# Redirect HTTPS to HTTP server { listen 80; listen [::]:80; @@ -16,10 +20,8 @@ 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; + return 404; } # Proxy weechat @@ -30,10 +32,4 @@ server { proxy_set_header Connection "upgrade"; proxy_read_timeout 8h; } - - # Serve misc files - location /files { - alias /files-docker; - autoindex on; - } } diff --git a/madone/docker/nginx/launch.sh b/madone/docker/nginx/launch.sh index 7a6bc94..7467dd4 100755 --- a/madone/docker/nginx/launch.sh +++ b/madone/docker/nginx/launch.sh @@ -15,7 +15,7 @@ docker run \ --env TZ=US/Eastern \ --volume $PWD/nginx-config:/config:rw \ --volume $PWD/nginx.conf:/config/nginx/nginx.conf:ro \ - --volume $PWD/site-confs:/config/nginx/site-confs:ro \ + --volume $PWD/default:/config/nginx/default:ro \ --volume $HOME/files:/files-docker:ro \ --publish 51.159.29.122:80:80 \ --publish 51.159.29.122:443:443 \ diff --git a/madone/docker/nginx/nginx.conf b/madone/docker/nginx/nginx.conf index 4c3f0ca..209d7fa 100644 --- a/madone/docker/nginx/nginx.conf +++ b/madone/docker/nginx/nginx.conf @@ -56,8 +56,7 @@ http { # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; - include /config/nginx/site-confs/default; - include /config/nginx/site-confs/*.enabled; + include /config/nginx/default; } daemon off; diff --git a/madone/docker/nginx/site-confs/default b/madone/docker/nginx/site-confs/default deleted file mode 100644 index f63f895..0000000 --- a/madone/docker/nginx/site-confs/default +++ /dev/null @@ -1,29 +0,0 @@ -## Based on version below; but heavily modified for LUUG -## Version 2018/09/12 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default - -# This is the main file that will be pe present no matter what -# Individual sites are specified in /config/nginx/sites/*.enabled - -# Redirect unknown HTTP traffic to https://seaturtle.pw -server { - listen 80 default_server; - listen [::]:80 default_server; - server_name _; - - return 301 https://seaturtle.pw; -} - -# Redirect unknown HTTPS traffic to https://seaturtle.pw -# If we don't have a cert for the site the client get an error but that's fine -server { - listen 443 default_server; - listen [::]:443 default_server; - server_name _; - - # ssl conf - include /config/nginx/ssl.conf; - - return 301 https://seaturtle.pw; -} - -# Enabled sites are included in /config/nginx/nginx.conf diff --git a/madone/docker/nginx/site-confs/paul.walko.org.enabled b/madone/docker/nginx/site-confs/paul.walko.org.enabled deleted file mode 100644 index aa0db58..0000000 --- a/madone/docker/nginx/site-confs/paul.walko.org.enabled +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 97fc6c8..0000000 --- a/madone/docker/nginx/site-confs/walko.org.enabled +++ /dev/null @@ -1,34 +0,0 @@ -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; - } -}