diff --git a/roles/webserver-legacy/nginx/files/vhosts/hypership.space/www.conf b/roles/webserver-legacy/nginx/files/vhosts/hypership.space/www.conf new file mode 100644 index 0000000..284bb93 --- /dev/null +++ b/roles/webserver-legacy/nginx/files/vhosts/hypership.space/www.conf @@ -0,0 +1,81 @@ +# ------------------------------------------------------------- +# Webserver +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Site: hypership.space +# License: Trivial work, not eligible to copyright +# Source file: roles/webserver-legacy/nginx/files/vhosts/hypership.space/www.conf +# ------------------------------------------------------------- +# +# <auto-generated> +# This file is managed by our rOPS SaltStack repository. +# +# Changes to this file may cause incorrect behavior +# and will be lost if the state is redeployed. +# </auto-generated> + +# ------------------------------------------------------------- +# Main application +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +server { + server_name hypership.space; + + include includes/tls; + ssl_certificate /usr/local/etc/letsencrypt/live/hypership.space/fullchain.pem; + ssl_certificate_key /usr/local/etc/letsencrypt/live/hypership.space/privkey.pem; + + error_log /var/log/www/hypership.space/www-error.log; + access_log /var/log/www/hypership.space/www-access.log; + + location / { + return 503; + } +} + +# ------------------------------------------------------------- +# Redirections from port 80 and alternative domains +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +server { + listen 80; + listen [::]:80; + server_name hypership.space; + + include includes/letsencrypt; + + location / { + return 301 https://hypership.space$request_uri; + } +} + +server { + listen 80; + listen [::]:80; + server_name www.hypership.space zed.dereckson.be; + + include includes/tls; + ssl_certificate /usr/local/etc/letsencrypt/live/hypership.space/fullchain.pem; + ssl_certificate_key /usr/local/etc/letsencrypt/live/hypership.space/privkey.pem; + + include includes/letsencrypt; + + location / { + return 301 https://hypership.space$request_uri; + } +} + +# ------------------------------------------------------------- +# Development and staging area +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +server { + listen 80; + listen [::]:80; + server_name zed51.dereckson.be; + + include includes/letsencrypt; + + location / { + return 503; + } +}