80 lines
2.3 KiB
Plaintext
80 lines
2.3 KiB
Plaintext
<IfModule mod_ssl.c>
|
|
|
|
<VirtualHost *:443>
|
|
ServerName webmail.lunch.org.uk
|
|
|
|
ErrorLog /var/log/apache2/webmail-error.log
|
|
CustomLog /var/log/apache2/webmail-access.log combined
|
|
|
|
RemoteIPProxyProtocol On
|
|
|
|
Alias / /var/lib/roundcube/
|
|
<Directory /var/lib/roundcube/>
|
|
Options +FollowSymLinks
|
|
# This is needed to parse /var/lib/roundcube/.htaccess. See its
|
|
# content before setting AllowOverride to None.
|
|
AllowOverride All
|
|
<IfVersion >= 2.3>
|
|
Require all granted
|
|
</IfVersion>
|
|
<IfVersion < 2.3>
|
|
Order allow,deny
|
|
Allow from all
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
# Protecting basic directories:
|
|
<Directory /var/lib/roundcube/config>
|
|
Options -FollowSymLinks
|
|
AllowOverride None
|
|
</Directory>
|
|
|
|
<Directory /var/lib/roundcube/temp>
|
|
Options -FollowSymLinks
|
|
AllowOverride None
|
|
<IfVersion >= 2.3>
|
|
Require all denied
|
|
</IfVersion>
|
|
<IfVersion < 2.3>
|
|
Order allow,deny
|
|
Deny from all
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
<Directory /var/lib/roundcube/logs>
|
|
Options -FollowSymLinks
|
|
AllowOverride None
|
|
<IfVersion >= 2.3>
|
|
Require all denied
|
|
</IfVersion>
|
|
<IfVersion < 2.3>
|
|
Order allow,deny
|
|
Deny from all
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
SSLEngine on
|
|
SSLCertificateFile /var/local/certificates/mail.lunch.org.uk/fullchain.pem
|
|
SSLCertificateKeyFile /var/local/certificates/mail.lunch.org.uk/privkey.pem
|
|
</VirtualHost>
|
|
|
|
</IfModule>
|
|
|
|
<VirtualHost *:80>
|
|
ServerName webmail.lunch.org.uk
|
|
|
|
ErrorLog /var/log/apache2/webmail-error.log
|
|
CustomLog /var/log/apache2/webmail-access.log combined
|
|
|
|
RemoteIPProxyProtocol On
|
|
|
|
<IfModule rewrite_module>
|
|
#
|
|
# This redirects all accesses to the HTTPS version of the site.
|
|
#
|
|
RewriteEngine On
|
|
|
|
RewriteRule ^/?(.*) https://webmail.lunch.org.uk/$1 [R=301,L]
|
|
</IfModule>
|
|
</VirtualHost>
|