Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #192.168.0.231 is the Nextcloud server and port 9402 is used in the docker file.
- <VirtualHost *:80>
- ServerName nextcloud.domain.com
- Redirect permanent / https://nextcloud.domain.com/login
- ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
- CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
- ProxyPreserveHost On
- ProxyPass / http://192.168.0.231:9402/
- ProxyPassReverse / http://192.168.0.231:9402/
- 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} =nextcloud.domain.com
- RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
- </VirtualHost>
- <VirtualHost *:443>
- ServerName nextcloud.domain.com
- Redirect permanent / https://nextcloud.domain.com/login
- ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
- CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
- SSLEngine On
- ProxyPreserveHost On
- ProxyPass / http://192.168.0.231:9402/
- ProxyPassReverse / http://192.168.0.231:9402/
- # Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
- 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/cloud.plexrva.com-0001/fullchain.pem
- SSLCertificateKeyFile /etc/letsencrypt/live/cloud.plexrva.com-0001/privkey.pem
- </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement