7月からchromeでhttpサイトに警告されるのでその対策
ここのサイトだと、2018年1月からできなくなったっぽいので対策。
参考文献
bash
a2enmod ssl
/etc/apache2/sites-available/default-ssl.conf
ServerAdmin xxx@yyy.zzz
ServerName xxx.yyy.zzz
DocumentRoot /var/www/html
bash
a2ensite default-ssl
#入ってたらいらない
sudo apt-get install -y software-properties-common
#レポジトリを追加
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot python-certbot-apache
sudo apt-get install letsencrypt python-letsencrypt-apache
sudo letsencrypt run --apache
#色々入力を求められます。どっちも1を選びました
# Which names would you like to activate HTTPS for?
# -------------------------------------------------------------------------------
# 1: xxx.yyy
# 2: www.xxx.yyy
# -------------------------------------------------------------------------------
# Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
# -------------------------------------------------------------------------------
# 1: No redirect - Make no further changes to the webserver configuration.
# 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
# new sites, or if you're confident your site works on HTTPS. You can undo this
# change by editing your web server's configuration.
# -------------------------------------------------------------------------------
# Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
sudo service apache2 reload