Monday 1 March 2021

Bitnami HTTPS Configuration

 bitnami@ip-172-26-44-221:/opt/bitnami$ sudo /opt/bitnami/bncert-tool
----------------------------------------------------------------------------
Welcome to the Bitnami HTTPS Configuration tool.

----------------------------------------------------------------------------
Domains

Please provide a valid space-separated list of domains for which you wish to
configure your web server.

Domain list []: dev.whyscience.com


The following domains were not included: www.dev.whyscience.com. 

Do you want to add them? [Y/n]: n



Warning: No www domains (e.g. www.example.com) or non-www domains (e.g.
www.example.com) have been provided, so the following redirections will be
disabled: non-www to www, www to non-www.
Press [Enter] to continue:
----------------------------------------------------------------------------
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


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:                                                                                        
dev.whyscience.com
3. Configure a cron job to automatically renew the certificate each month
4. Configure web server name to: dev.whyscience.com
5. Enable HTTP to HTTPS redirection (example: redirect http://dev.whyscience.com                                                                                        
to https://dev.whyscience.com)
6. Start web server once all changes have been performed


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

----------------------------------------------------------------------------
Error: There has been an error.
Cannot bind to port 80 and/or 443. These ports are used for Let's Encrypt to
verify the domain DNS configuration. Please stop any services using those ports,                                                                                        
and ensure your system user has permissions to bind to them.
Press [Enter] to continue:

----------------------------------------------------------------------------

To solve this issue

Look for who is using the port 

bitnami@ip-172-26-44-221:/opt/bitnami$ sudo fuser 443/tcp
443/tcp:              3693  4811 12652 12900 13082

and then kill the process

bitnami@ip-172-26-44-221:/opt/bitnami$ sudo fuser -k 443/tcp
443/tcp:              3693  4811 12652 12900 13082


Now rerun you will not see anything

bitnami@ip-172-26-44-221:/opt/bitnami$ sudo fuser 443/tcp
bitnami@ip-172-26-44-221:/opt/bitnami$ sudo fuser -k 443/tcp

------------------------------------------------------------------------------

Then rerun the command

 bitnami@ip-172-26-44-221:/opt/bitnami$ sudo /opt/bitnami/bncert-tool

 

----------------------------------------------------------------------------
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.

/Warning: Certificates may not renew automatically, due to a web server
configuration issue. For more information see:
https://docs.bitnami.com/general/how-to/understand-bncert/#certificates-not-renew
ed-automatically
Press [Enter] to continue:                                                                                                                                             ----------------------------------------------------------------------------
Some errors occurred


The configuration was applied, but some of the changes could not be applied.
Find the details below.

The configuration report is shown below.

Failed steps:
* Creating Let's Encrypt certificate: Automatic renewal not working

Find more details in the log file:
/tmp/bncert-202103020529.log

Now check the httpd.conf ; especially running port if it is not 80 and 443 then change.

Then rerun the command

 bitnami@ip-172-26-44-221:/opt/bitnami$ sudo /opt/bitnami/bncert-tool



No comments:

Post a Comment