So I am trying to setup a wordpress site with Apache2 on Ubuntu Server 16.04.
My setup is as follows:
Nginx - Redirects to Apache2
Apache2 - Hosts the site
When I try to run certbot to get a certificate for apache2 I get the following error:
"Deploying Certificate for www.example.com to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf
Error while running apache2ctl graceful.
httpd not running, trying to start
Action ‘graceful’ failed.
The Apache error log may have more information.
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:5
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
AH00015: Unable to open logs
Rolling back to previous server configuration…"
The reason I am trying to get a certificate for the apache server is that when I got to http://www.example.com, Nginx redirects me to https and then the apache server. I am presentet with I saite only displaying https content and that is not a very pretty look.
I do understand that certbot are trying to restart apache server using 443, which nginx is already using but how can I fix this? Please let me know if I should update the question with any information from logs or config files.
Best regards
Anders