Enable ssl site
sudo a2ensite ssl
Enable ssl, rewrite mod
sudo a2enmod rewrite sudo a2enmod ssl
Add rewrite commands in /etc/apache2/sites-enabled/000-default, redirecting all connections on port 80 to https
RewriteEngine on RewriteCond %{SERVER_PORT} ^80$ RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
Restart Apache
sudo service apache2 restart
-- EOF --
除非注明(如“转载”、“[zz]”等),本博文章皆为原创内容,转载时请注明: 「转载自程序员的信仰©」
本文链接地址:Enable HTTPS on Ubuntu
Today on history:
【2007】无题
【2007】Life on Picasa
发表回复