-
-
Save MarkJr94/24e4cabaa159e564b9fbdf3b1b753925 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