ServerAdmin webmaster@localhost RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} DocumentRoot /var/www/ Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 ######################################### #### XXX: BEGIN EDIT FOR MOD_REWRITE #### #### This is intended to force HTTPS #### #### for all inbound HTTP requests #### #### # This module (mod_rewrite) simply tells Apache2 that all connections to # port 80 need to go to port 443 . SSL . No exceptions #### LoadModule rewrite_module modules/mod_rewrite.so RewriteEngine on #### # The line below sets the rewrite condition for mod_rewrite.so. # If the server port does not equal 443, then this condition is true #### ReWriteCond %{SERVER_PORT} !^443$ #### # The line below is the rule, it states that if above condition is true, # and the request can be any url, then redirect everything to https:// plus # the original url that was requested. #### RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] #### XXX: END EDIT FOR MOD_REWRITE #### ####################################### AuthType Digest AuthName "gods" AuthDigestDomain /var/www/rtorrent/ http://your.server.ip/rtorrent AuthDigestProvider file AuthUserFile /etc/passwords Require valid-user SetEnv R_ENV "/var/www/rtorrent" ServerAdmin webmaster@localhost SSLEngine on SSLCertificateFile /etc/apache2/apache.pem DocumentRoot /var/www/ Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 AuthType Digest AuthName "gods" AuthDigestDomain /var/www/rtorrent/ http://your.server.ip/rtorrent AuthDigestProvider file AuthUserFile /etc/passwords Require valid-user SetEnv R_ENV "/var/www/rtorrent"