summaryrefslogtreecommitdiff
path: root/apache2/sites-available/www.secure-example.com.conf
diff options
context:
space:
mode:
Diffstat (limited to 'apache2/sites-available/www.secure-example.com.conf')
-rw-r--r--apache2/sites-available/www.secure-example.com.conf36
1 files changed, 36 insertions, 0 deletions
diff --git a/apache2/sites-available/www.secure-example.com.conf b/apache2/sites-available/www.secure-example.com.conf
new file mode 100644
index 0000000..8aebebf
--- /dev/null
+++ b/apache2/sites-available/www.secure-example.com.conf
@@ -0,0 +1,36 @@
+<VirtualHost *:80>
+ ServerName www.example.com
+ ServerAlias www
+ ServerAdmin webmaster@example.com
+ DocumentRoot /home/webmaster/public_websites/www.example.com/
+
+ ErrorLog ${APACHE_LOG_DIR}/www.example.com-error.log
+ CustomLog ${APACHE_LOG_DIR}/www.example.com-access.log combined
+</VirtualHost>
+<VirtualHost *:80>
+ ServerName example.com
+ ServerAlias *.www.example.com
+
+ Include conf.d/local-log-origin.conf
+
+ RewriteEngine On
+ RewriteRule / http://www.example.com/ [R]
+# RewriteRule /(.*) http://www.example.com/$1 [R]
+
+ CustomLog ${APACHE_LOG_DIR}/redirect.log origin
+</VirtualHost>
+<VirtualHost *:443>
+ ServerName www.example.com:443
+ ServerName *.example.com:443
+ ServerName www:443
+ ServerName *.www:443
+
+ Include conf.d/local-ssl.conf
+ Include conf.d/local-log-origin.conf
+
+ RewriteEngine On
+ RewriteRule / http://www.example.com/ [R]
+# RewriteRule /(.*) http://www.example.com/$1 [R]
+
+ CustomLog ${APACHE_LOG_DIR}/redirect.log origin
+</VirtualHost>