Tweaks to set up more hostnames chankillo
authorAlex Dehnert <alex@dehnerts.com>
Sat, 5 Aug 2023 18:48:23 +0000 (18:48 +0000)
committerAlex Dehnert <alex@dehnerts.com>
Sat, 5 Aug 2023 18:48:23 +0000 (18:48 +0000)
sites-available/mit-proxy.conf
sites-common/default

index 7babd55198662df5320bdb57f06e1e0091fea685..1ac172ff0d60223f09ecb977c00072ad297d8220 100644 (file)
     ProxyPassReverse "/"  "http://zulip.augsburg.vms.dehnerts.com/"
     ProxyPreserveHost on
 
-    DocumentRoot /var/www/letsencrypt-verify/
+    DocumentRoot /var/www/html/
     RewriteEngine on
-    RewriteCond /var/www/letsencrypt-verify/%{REQUEST_URI} !-f
+    RewriteCond /var/www/html/%{REQUEST_URI} !-f
     RewriteRule ^/.well-known/acme-challenge/(.*)$ http://zulip.augsburg.vms.dehnerts.com/.well-known/acme-challenge/$1 [P,QSA,L]
 </VirtualHost>
 
-#<IfModule mod_ssl.c>
-#<VirtualHost *:443>
-#    ServerName zulip.dehnerts.com
-#    ServerAlias *.zulip.dehnerts.com
-#    SSLProxyEngine on
-#    SSLProxyVerify require
-#    SSLProxyVerifyDepth 2
-#    SSLProxyCACertificatePath /etc/ssl/certs
-#    SSLProxyCheckPeerName on
-#    ProxyPass "/"  "https://zulip.augsburg.vms.dehnerts.com/"
-#    ProxyPassReverse "/"  "https://zulip.augsburg.vms.dehnerts.com/"
-#    ProxyPreserveHost on
-#    Include sites-common/ssl-common
-#    SSLCertificateFile /etc/letsencrypt/live/zulip.dehnerts.com/fullchain.pem
-#    SSLCertificateChainFile /etc/letsencrypt/live/zulip.dehnerts.com/fullchain.pem
-#    SSLCertificateKeyFile /etc/letsencrypt/live/zulip.dehnerts.com/privkey.pem
-#</VirtualHost>
-#</IfModule>
+<IfModule mod_ssl.c>
+<VirtualHost *:443>
+    ServerName zulip.dehnerts.com
+    ServerAlias *.zulip.dehnerts.com
+    SSLProxyEngine on
+    SSLProxyVerify require
+    SSLProxyVerifyDepth 2
+    SSLProxyCACertificatePath /etc/ssl/certs
+    SSLProxyCheckPeerName on
+    ProxyPass "/"  "https://zulip.augsburg.vms.dehnerts.com/"
+    ProxyPassReverse "/"  "https://zulip.augsburg.vms.dehnerts.com/"
+    ProxyPreserveHost on
+    Include sites-common/ssl-common
+    <IfFile "/etc/letsencrypt/live/zulip.dehnerts.com/">
+        SSLCertificateFile /etc/letsencrypt/live/zulip.dehnerts.com/fullchain.pem
+        SSLCertificateChainFile /etc/letsencrypt/live/zulip.dehnerts.com/fullchain.pem
+        SSLCertificateKeyFile /etc/letsencrypt/live/zulip.dehnerts.com/privkey.pem
+    </IfFile>
+    <IfFile ! "/etc/letsencrypt/live/zulip.dehnerts.com/">
+        #Warning "correct default cert not detected, falling back to snakeoil"
+        SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
+        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+    </IfFile>
+</VirtualHost>
+</IfModule>
index 7fbca5c66db93dcb4ec67486430ec2947a45a31b..9a46a8a56eaf944a8db3bac55a30fd22a6eb3083 100644 (file)
@@ -1,6 +1,6 @@
 ServerAdmin webmaster@dehnerts.com
 ServerName chankillo.dehnerts.com
-ServerAlias chankillo.mit.edu dehnerts.com www.dehnerts.com www.dehnert.arctic.org
+ServerAlias chankillo.mit.edu dehnerts.com www.dehnerts.com www.dehnert.arctic.org git.dehnerts.com
 
 DocumentRoot /var/www/html/
 <Directory />