Last active
January 27, 2020 18:20
-
-
Save nickian/b5e4083010f227ea9dc77fbf829b294a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 *:443> | |
ServerName cloud.domain.com | |
ServerAlias cloud.domain.com | |
DocumentRoot /mnt/drive/cloud.domain.com/www | |
<Directory /mnt/drive/cloud.domain.com/www> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
AddType application/x-httpd-php .php3 .php | |
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm | |
SSLEngine on | |
SSLCertificateFile /etc/letsencrypt/live/cloud.domain.com/cert.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/cloud.domain.com/privkey.pem | |
SSLCertificateChainFile /etc/letsencrypt/live/cloud.domain.com/chain.pem | |
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4 | |
SSLProtocol All -SSLv2 -SSLv3 | |
SSLCompression off | |
SSLHonorCipherOrder on | |
<IfModule mod_headers.c> | |
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload" | |
</IfModule> | |
<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 | |
# MSIE 7 and newer should be able to use keepalive | |
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown | |
</VirtualHost> | |
</IfModule> | |
# PORT FORWARD FROM 80 TO: 443 | |
<virtualhost *:80> | |
ServerName cloud.domain.com | |
ServerAlias cloud.domain.com | |
RewriteEngine on | |
ReWriteCond %{SERVER_PORT} !^443$ | |
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] | |
</virtualhost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment