From ba98ffe58774b57f37862a2bd892a4f2692b27fd Mon Sep 17 00:00:00 2001 From: nonphatic Date: Sat, 2 Jun 2018 16:35:09 -0700 Subject: [PATCH] Added config for al.ert.space; ex.ert.space now points to Nextcloud. --- al.ert.space | 44 ++++++++++++++++++++++++++++++++++++++++++++ ex.ert.space | 24 ++++-------------------- 2 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 al.ert.space diff --git a/al.ert.space b/al.ert.space new file mode 100644 index 0000000..547b4e5 --- /dev/null +++ b/al.ert.space @@ -0,0 +1,44 @@ +server { + + server_name al.ert.space; + root /srv/www/al.ert.space/app; + index index.html /server/index.php; + + auth_basic "Authentication Required"; + auth_basic_user_file /etc/apache2/.htpasswd; + + location / { + try_files $uri $uri/ =404; + } + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + } + + location ~ /\.ht { + deny all; + } + + listen [::]:443 ssl; # managed by Certbot + listen 443 ssl; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/al.ert.space/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/al.ert.space/privkey.pem; # managed by Certbot + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + +} +server { + if ($host = al.ert.space) { + return 301 https://$host$request_uri; + } # managed by Certbot + + + listen 80; + listen [::]:80; + + server_name al.ert.space; + return 404; # managed by Certbot + + +} diff --git a/ex.ert.space b/ex.ert.space index bdf07a4..a311567 100644 --- a/ex.ert.space +++ b/ex.ert.space @@ -1,24 +1,9 @@ server { - - root /srv/docker/syncthing/sync; - index /_h5ai/public/index.php; - server_name ex.ert.space; - - auth_basic "Authentication Required"; - auth_basic_user_file /etc/apache2/.htpasswd; - location / { - try_files $uri $uri/ =404; - } - - location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php7.0-fpm.sock; - } - - location ~ /\.ht { - deny all; + proxy_pass http://localhost:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; } listen [::]:443 ssl; # managed by Certbot @@ -37,9 +22,8 @@ server { listen 80; listen [::]:80; - server_name ex.ert.space; return 404; # managed by Certbot -} +} \ No newline at end of file