Categories

Links

License

Creative Commons License

Unless otherwise expressly stated, all original material of whatever nature created by and included in this weblog is licensed under a Creative Commons License.

Enforce HTTPS for your virtualhosts, 16.09.2007 14:13

NameVirtualHost *:443
NameVirtualHost *:80

<VirtualHost *:80>
	ServerName example.org
	RewriteEngine on
	RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
</VirtualHost>

<VirtualHost *:443>
	ServerName example.org
	DocumentRoot /var/www/example.org
	...
</VirtualHost>

blog comments powered by Disqus