1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ sudo a2enmod ssl [sudo] password for ubuntu: Considering dependency setenvif for ssl: Module setenvif already enabled Considering dependency mime for ssl: Module mime already enabled Considering dependency socache_shmcb for ssl: Enabling module socache_shmcb. Enabling module ssl. See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates. To activate the new configuration, you need to run: systemctl restart apache2 $ sudo a2ensite default-ssl Enabling site default-ssl. To activate the new configuration, you need to run: systemctl reload apache2 $ sudo service apache2 restart |
confファイルには以下のように書く。
今回はvirtual.host.confを変更しています。
1 2 3 4 5 6 7 8 9 |
ServerName hogehoge.com ServerAdmin webmaster@virtual.host DocumentRoot /home/ubuntu/public_html/usj ErrorLog /var/log/apache2/virtual.host.error.log CustomLog /var/log/apache2/virtual.host.access.log combined LogLevel warn SSLCertificateFile xxxx SSLCertificateKeyFile xxxx SSLCertificateChainFile xxxx |