Last active
June 29, 2016 01:56
-
-
Save pokev25/fba0d6ec89d112fcf56e3977dc38ea98 to your computer and use it in GitHub Desktop.
apache config ssl proxy
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
# 80 -> 443 redirect | |
<VirtualHost *:80> | |
ServerName yona.domain.com | |
RewriteEngine on | |
RewriteCond %{HTTPS} !on | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L] | |
</VirtualHost> | |
<VirtualHost *:443> | |
SSLEngine on | |
SSLCertificateFile /etc/apache2/ssl/domain.crt | |
SSLCertificateKeyFile /etc/apache2/ssl/yona.key | |
SSLCertificateChainFile /etc/apache2/ssl/1_root_bundle.crt | |
# HSTS (mod_headers is required) (15768000 seconds = 6 months) | |
Header always set Strict-Transport-Security "max-age=15768000" | |
ServerName yona.domain.com | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html | |
ErrorLog ${APACHE_LOG_DIR}/error_yona.log | |
CustomLog ${APACHE_LOG_DIR}/access_yona.log combined | |
ProxyRequests Off | |
ProxyPreserveHost On | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass / http://127.0.0.1:9000/ | |
ProxyPassReverse / http://127.0.0.1:9000/ | |
</VirtualHost> | |
# intermediate configuration, tweak to your needs | |
SSLProtocol all -SSLv3 | |
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS | |
SSLHonorCipherOrder on | |
SSLCompression off | |
# OCSP Stapling, only in httpd 2.3.3 and later | |
SSLUseStapling on | |
SSLStaplingResponderTimeout 5 | |
SSLStaplingReturnResponderErrors off | |
SSLStaplingCache shmcb:/var/run/ocsp(128000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment