summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2020-10-11 20:47:48 +0200
committerJonas Smedegaard <dr@jones.dk>2020-10-11 20:47:48 +0200
commit522e8d71cc89e670cb33d3b3bdb311d478397860 (patch)
treeb0aee67c42c4a15e1f5c2ecba2af387dc7ce5479
parentc9672c7f9bb5eb8be75412e131a225f54a4d2761 (diff)
fix separate default vhost 0_default from (new) example vhost zzz_wrong.example.com
-rw-r--r--apache2/sites-available/0_default.conf28
-rw-r--r--apache2/sites-available/zzz_wrong.example.com.conf19
2 files changed, 34 insertions, 13 deletions
diff --git a/apache2/sites-available/0_default.conf b/apache2/sites-available/0_default.conf
index 2757fb9..765cc8d 100644
--- a/apache2/sites-available/0_default.conf
+++ b/apache2/sites-available/0_default.conf
@@ -1,19 +1,21 @@
-<VirtualHost *:80>
- ServerName wrong.example.com
- ServerAlias wrong
- ServerAdmin webmaster@example.com
- DocumentRoot /home/webmaster/public_websites/wrong.example.com
+Define _TLS_CERT_CHAIN /etc/ssl/certs/ssl-cert-snakeoil.pem
+Define _TLS_KEY /etc/ssl/private/ssl-cert-snakeoil.key
- ErrorLog ${APACHE_LOG_DIR}/wrong.example.com-error.log
- CustomLog ${APACHE_LOG_DIR}/wrong.example.com-access.log combined
+<VirtualHost _default_:80>
+ ServerAdmin webmaster@localhost
+ DocumentRoot /var/www/html
+
+ ErrorLog ${APACHE_LOG_DIR}/error.log
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
-<VirtualHost *:443>
- ServerName wrong.example.com
- ServerAdmin webmaster@example.com
- DocumentRoot /home/webmaster/public_websites/wrong.example.com
+<VirtualHost _default_:443>
+ DocumentRoot /var/www/html
Include conf.d/local-ssl.conf
- ErrorLog ${APACHE_LOG_DIR}/wrong.example.com-error.log
- CustomLog ${APACHE_LOG_DIR}/wrong.example.com-access.log combined
+ ErrorLog ${APACHE_LOG_DIR}/error.log
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
+
+Undefine _TLS_CERT_CHAIN
+Undefine _TLS_KEY
diff --git a/apache2/sites-available/zzz_wrong.example.com.conf b/apache2/sites-available/zzz_wrong.example.com.conf
new file mode 100644
index 0000000..2757fb9
--- /dev/null
+++ b/apache2/sites-available/zzz_wrong.example.com.conf
@@ -0,0 +1,19 @@
+<VirtualHost *:80>
+ ServerName wrong.example.com
+ ServerAlias wrong
+ ServerAdmin webmaster@example.com
+ DocumentRoot /home/webmaster/public_websites/wrong.example.com
+
+ ErrorLog ${APACHE_LOG_DIR}/wrong.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/wrong.example.com-access.log combined
+</VirtualHost>
+<VirtualHost *:443>
+ ServerName wrong.example.com
+ ServerAdmin webmaster@example.com
+ DocumentRoot /home/webmaster/public_websites/wrong.example.com
+
+ Include conf.d/local-ssl.conf
+
+ ErrorLog ${APACHE_LOG_DIR}/wrong.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/wrong.example.com-access.log combined
+</VirtualHost>