Skip to content

Instantly share code, notes, and snippets.

@georgeoftown
Created October 19, 2018 09:45
Show Gist options
  • Save georgeoftown/58a4c800a6c004401bb97180db8a22e9 to your computer and use it in GitHub Desktop.
Save georgeoftown/58a4c800a6c004401bb97180db8a22e9 to your computer and use it in GitHub Desktop.
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
</IfModule>
DocumentRoot /var/www/owncloud
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/owncloud/>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
SetEnv MOD_X_SENDFILE_ENABLED 1
XSendFile On
XSendFilePath /var/www/owncloud/data
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/mycert.pem
SSLCertificateKeyFile /etc/ssl/private/mycert.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment