Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <VirtualHost *:80>
- ServerName xxxx.xxxx.com
- Redirect / https://xxxx.xxxx.com/login
- ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
- CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
- ProxyPreserveHost On
- ProxyPass / http://x.x.x.x:8080/
- ProxyPassReverse / http://x.x.x.x:8080/
- RewriteCond %{HTTPS} !=on
- RewriteCond %{HTTP:X-Forwarded-Proto} =http
- RewriteCond %{HTTP_HOST} ^xxxx.xxxx.com
- RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
- RewriteEngine On
- RewriteRule ^/\.well-known/carddav http://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
- RewriteRule ^/\.well-known/caldav http://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
- RewriteCond %{SERVER_NAME} =xxxx.xxxx.com
- RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
- </VirtualHost>
- <VirtualHost *:443>
- Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
- ServerName xxxx.xxxx.com
- ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
- CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
- SSLEngine On
- ProxyPreserveHost On
- ProxyPass / http://x.x.x.x:8080/
- ProxyPassReverse / http://x.x.x.x:8080/
- RewriteEngine On
- RewriteRule ^/\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
- RewriteRule ^/\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
- Include /etc/letsencrypt/options-ssl-apache.conf
- SSLCertificateFile /etc/letsencrypt/live/xxxx.xxxx.com-0001/fullchain.pem
- SSLCertificateKeyFile /etc/letsencrypt/live/xxxx.xxxx.com-0001/privkey.pem
- </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment