Snippets tagged "https server"
classés par date
get by popularity
Replier tout
Redirect HTTP -> HTTPS requests in a VirtualHost
<VirtualHost 100.101.102.103:80> ServerName subdomain.domain.tld DocumentRoot /path/to/docroot <IfModule mod_rewrite.c> RewriteEngine on RewriteLog /var/log/apache2/https_rewrite.log RewriteLogLevel 1 RewriteCond %{SERVER_PORT} !^443$ RewriteCond %{SERVER_NAME} ^subdomain.domain.tld$ RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R] </IfModule> </VirtualHost> <VirtualHost 100.101.102.103:443> ServerName subdomain.domain.tld DocumentRoot /path/to/docroot SSLEngine On SSLCertificateFile /etc/apache2/ssl_conf/myservicename.crt SSLCertificateKeyFile /etc/apache2/ssl_conf/myservicename.key </VirtualHost>
