rorenv/apache/kopano.conf

31 lines
844 B
Plaintext
Raw Normal View History

2023-04-29 21:11:49 +09:00
<VirtualHost *:80>
ServerName mail.example.net
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{SERVER_NAME} =mail.example.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName mail.example.net
ServerAdmin webmaster@example.net
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/kopano-error.log
CustomLog ${APACHE_LOG_DIR}/kopano-access.log combined
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/(.*)$ /webapp [R=301,L]
ProxyPreserveHost on
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
SSLEngine on
SSLCertificateFile /etc/ssl/private/wildcard.example.net.crt
SSLCertificateKeyFile /etc/ssl/private/wildcard.example.net.key
</VirtualHost>