# Virtual host # Most of the hosts were removed for clarity # Secure Server ## ## SSL Virtual Host Context ## DocumentRoot "/var/www/secure_http" ServerName secure.domain.tld:443 ServerAlias secure secure.domain.tld ServerAdmin admin@domain.tld ErrorLog /var/log/httpd/error_log TransferLog /var/log/httpd/access_log SSLEngine on #SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+!LOW:+SSLv2:+EXP:+eNULL SSLCipherSuite HIGH:MEDIUM SSLCertificateFile /usr/pkg/etc/httpd/ssl.key/cert.crt SSLCertificateKeyFile /usr/pkg/etc/httpd/ssl.key/key.key #SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire SSLOptions +StrictRequire SSLOptions +StdEnvVars SSLOptions +StdEnvVars Options +FollowSymLinks DAV Off SetEnvIf User-Agent ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 # Per-Server Logging: # The home of a custom SSL log file. Use this when you want a # compact non-error SSL logfile on a virtual host basis. CustomLog /var/log/httpd/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" RewriteEngine On # this is a host that also exists in http RewriteCond %{HTTP_HOST} ^mail\.smurfturf\.net$ [NC] RewriteRule ^(.*)$ https://secure.smurfturf.net/mail$1 [R=301,L] # This is the main http server RewriteCond %{HTTP_HOST} ^((www\.)|^)smurfturf\.net$ [NC] RewriteRule ^(.*)$ https://secure.smurfturf.net/www$1 [R=301,L] RewriteCond %{HTTP_HOST} !^secure\.smurfturf\.net$ [NC] RewriteRule ^(.*)$ https://secure.smurfturf.net$1 [R=301,L] # Block TRACE/TRACK XSS vector RewriteCond %{REQUEST_METHOD} ^TRAC(E|K) RewriteRule .* - [F]