AWS: docker container cannot connect to external website on SSL
On my ec2 instance, there is a container hosting a website (e.g. WordPress).
This containers binds container ports 80 and 443 to ports 8080 ad 8081 of the host (both are enabled for inbound traffic in the security group).
The problem is that the website inside the container needs to connect to external websites on SSL, but it fails in doing so.
It looks like a problem of the security group/firewall…but I coudn’t detect the specific cause yet, as the security group is now it should work.
If I enter the container, ping of the external website (e.g. wordpress.org) works.
I don’t know if it is related, but recently the EC2 instance had problem validating ssl certificates, even the python pip tool wasn’t able to validate SSL certificate inside the container.
Does wordpress use another port – no 443 port – to connect to wordpress.org?
- the specific error message is the following:
SSL certificate problem: unable to get local issuer certificate
- one the website is WordPress, and it logs the following message:
Warning: An unexpected error occurred. Something may be wrong with
WordPress.org or this server’s configuration. If you continue to have
problems, please try the support forums. (WordPress could not
establish a secure connection to WordPress.org. Please contact your
server administrator.) in /var/www/html/wp-includes/update.php on line
- the website is not configured to serve https
- inside both the container and the host the packet