Create vHost in AWS after install cerbot

I have an instance in AWS with multiple vHost running. A few months ago I installed certbot to automatically renew the SSLs on our web sites. Ever since I installed the cerbot I have not been able to create new vHosts. I don’t know if its related or a coincidence but its been impossible to create new vHosts. I follow the vHost create process (see below) and then restart apache. When I try to access to the new web site I can’t see anything. Apache does not return any errors

This is my code and my process to create the vHost is:

  1. Create in /etc/apache2/site-availables/
  2. Copy this code in the
<VirtualHost *:80>
   ServerAdmin webmaster@localhost
   DocumentRoot /var/www/html

<Directory /var/www>
     Options +Indexes +FollowSymLinks +MultiViews
     AllowOverride all
     Order allow,deny
     allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
  1. Run sudo a2ensite
  2. sudo service apache2 restart

Can you share us your domain name in question?
Can you also define “can’t see anything”? Is the website loading?

Thank you

Sure, To testing i need create the vHost with domain but this go to ip by default entered in domain management.


When you created the virtualhost, you only created one with listen on port 80, which means it’s only working on http. If you want this domain to also work with https, you’ll need to create additional https virtualhost and also obtain a certificate to secure this domain.
If you visit this website in http, I beleiev it’ll show the correct content. If you visit the website in https and dismiss the error message, you’ll see one of the https virtualhost.

In short, add a https virtualhost for your domain and get a certificate.

Thank you

1 Like

Do you have a matching <VirtualHost *:443> block?

1 Like

Ok you are right, Perfect, Thanks!!!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.