Created
November 3, 2016 03:21
-
-
Save halfsight5000/879eb302b76faca62f2422877f583fba to your computer and use it in GitHub Desktop.
owncloud vhost subdomain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerName sub.domain.com | |
ServerAlias sub.domain.com | |
# Next line puts ownCloud at the domain root instead of a /cloud/ subdirectory (e.g. example.com vs. example.com/owncloud/) | |
Alias /cloud "/var/www/cloud/" | |
DocumentRoot /var/www/cloud | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLCertificateFile /etc/letsencrypt/live/sub.domain.com/fullchain.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/sub.domain.com/privkey.pem | |
Include /etc/letsencrypt/options-ssl-apache.conf | |
<Location /> | |
Order allow,deny | |
Allow from all | |
</Location> | |
<Directory /var/www/owncloud/> | |
Options +FollowSymlinks | |
AllowOverride All | |
SetEnv HOME /var/www/cloud | |
SetEnv HTTP_HOME /var/www/cloud | |
</Directory> | |
<IfModule mod_headers.c> | |
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains" | |
</IfModule> | |
</VirtualHost> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment