Apache - force https

Force secure connection (for auth)

Redirect
/etc/apache2/sites-available/default

[...] 

# redirect everything if accessed via http
<IfModule mod_rewrite.c>
    <IfModule mod_ssl.c>
         RewriteEngine On
         RewriteCond %{HTTPS} !=on
         RewriteRule (.*) https://host.domain.tld%{REQUEST_URI} [R=301,L]
    </IfModule>
</IfModule>

# explicit redirect to avoid multiple auth requests for this location
<Location /nagios3>
         Redirect permanent /nagios3 https://host.domain.tld/nagios3
</Location>

[...]
apache/ssl.txt · Last modified: 2014-05 by tb
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready