All pastes #519929 Raw Edit

Miscellany

public text v1 · immutable
#519929 ·published 2007-05-29 20:04 UTC
rendered paste body
echo 'NameVirtualHost *:80

UseCanonicalName Off

<VirtualHost *:80>
    ServerName www.tuxblogger.nl
    Redirect /webmail https://mail.tuxblogger.nl
    Redirect /mail https://mail.tuxblogger.nl
    DocumentRoot /var/www/apache2-default
    <Directory "/var/www/apache2-default">
        Options None
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName mail.tuxblogger.nl
    Redirect / https://mail.tuxblogger.nl
    #RewriteEngine On
    #RewriteCond %{HTTPS} !=on
    #RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

<VirtualHost *:80>
    ServerName webmail.tuxblogger.nl
    Redirect / https://mail.tuxblogger.nl
</VirtualHost>

NameVirtualHost *:443

<VirtualHost *:443>
    ServerName mail.tuxblogger.nl:443
    ServerAdmin webmaster@tuxblogger.nl
    SSLEngine on
    SSLCertificateFile /etc/ssl/ashley.cert
    SSLCertificateKeyFile /etc/ssl/ashley.key
    DocumentRoot /var/www/squirrelmail
    <Directory /var/www/squirrelmail>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride AuthConfig
        Order allow,deny
        allow from all
    </Directory>
    LogLevel warn
    ErrorLog /var/log/apache2/error-squirrelmail.log
    TransferLog /var/log/apache2/access-squirrelmail.log
    ServerSignature On
</VirtualHost>' > /etc/apache2/sites-available/tuxblogger.nl

cat /etc/apache2/sites-available/tuxblogger.nl
a2ensite tuxblogger.nl

/etc/init.d/apache2 force-reload