AWS 라이트세일 Bitnami WordPress 에 HTTPS 적용하기

도메인을 붙여 뒀다면, 아주 쉽게 https 를 적용할 수 있다.

SSH 접속한 이후, 아래 명령을 치면 그냥 된다.

몇가지 질문이 나오지만 기본적인 도메인 정보가 넣고 Yes 몇번하면 된다.

Prerequisites and limitations

  • Make sure that the domain in the DNS records points to the IP address of your Lightsail instance.
  • Certificate creation for wildcard domains isn’t possible using the bncert-tool.

Run the following command to launch the Bitnami HTTPS configuration tool:

sudo /opt/bitnami/bncert-tool

For more information on using or downloading the HTTPS Configuration Tool, see Learn about the Bitnami HTTPS configuration tool on the Bitnami documentation website.

https://aws.amazon.com/premiumsupport/knowledge-center/linux-lightsail-ssl-bitnami/Bitnami Stacks for Amazon Lightsail에 SSL 인증서 설치닫기 Ciara 씨의 동영상을 통해 자세히 알아보기(6:52)aws.amazon.com

예제로 내가 해놓은 것을 일단 로그만 남겨둔다

The following domains were not included: www.devbj.com. Do you want to add them? [Y/n]: Y

----------------------------------------------------------------------------
Enable/disable redirections

Please select the redirections you wish to enable or disable on your Bitnami 
installation.



Enable HTTP to HTTPS redirection [Y/n]: Y




Enable non-www to www redirection [Y/n]: n




Enable www to non-www redirection [y/N]: y


----------------------------------------------------------------------------
Changes to perform

The following changes will be performed to your Bitnami installation:

1. Stop web server
2. Configure web server to use a free Let's Encrypt certificate for the domains: 
devbj.com www.devbj.com
3. Configure a cron job to automatically renew the certificate each month
4. Configure web server name to: devbj.com
5. Enable HTTP to HTTPS redirection (example: redirect http://devbj.com to 
https://devbj.com)
6. Enable www to non-www redirection (example: redirect www.devbj.com to 
devbj.com)
7. Start web server once all changes have been performed



Do you agree to these changes? [Y/n]: 


----------------------------------------------------------------------------
Create a free HTTPS certificate with Let's Encrypt

Please provide a valid e-mail address for which to associate your Let's Encrypt 
certificate.

Domain list: devbj.com www.devbj.com

Server name: devbj.com

E-mail address []: bxxxxxx@gmail.com

The Let's Encrypt Subscriber Agreement can be found at:

https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf

Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]: 


----------------------------------------------------------------------------
Performing changes to your installation

The Bitnami HTTPS Configuration Tool will perform any necessary actions to your 
Bitnami installation. This may take some time, please be patient.

----------------------------------------------------------------------------
Success

The Bitnami HTTPS Configuration Tool succeeded in modifying your installation.

The configuration report is shown below.

Backup files:
* /opt/bitnami/apache/conf/httpd.conf.back.202212160608
* /opt/bitnami/apache/conf/bitnami/bitnami.conf.back.202212160608
* /opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf.back.202212160608
* /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf.back.202212160608
* /opt/bitnami/apache/conf/vhosts/wordpress-vhost.conf.back.202212160608

Find more details in the log file:

/tmp/bncert-202212160608.log

If you find any issues, please check Bitnami Support forums at:

https://github.com/bitnami/vms

Press [Enter] to continue:

bitnami@ip-172-26-1-237:~$

끝.

Share: Twitter Facebook
Bongjun Hur's Picture

About Bongjun Hur

BJ is a dev.

Seoul, Korea https://devbj.com