Question

Installed LetsEncrypt to get SSL and now my website is not reachable

I am following this tutorial https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04 and after I followed the steps and went to my website it was gone. I tried to log into the WordPress admin panel and the webpage and got a 403 error. I realized I forgot to add domain.com (the .com part) so I repeated the steps. Now I get “Success! The your_domain virtual host is working!” when I go to domain.com, instead of my wordpress site I built. What happened to my website!?

I don’t know what to do help would be really appreciated.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there @vinnyp96,

Can you share the content of your Apache virtual host? To do that you could first find the file with the following command

  1. ls -lah /etc/apache2/sites-enabled

There you should see 2 files associated with your domain name, one for your SSL Vhost and one for the non-SSL Vhost.

Then use the cat command to display the content:

  1. sudo cat /etc/apache2/sites-enabled/your-domain.conf

Feel free to share the output here.

Also please check your Apache error log with the following command:

  1. sudo tail -100 /var/log/apache2/error.log

Regards, Bobby

To add one going to www.domain.com all I see is “Success! The your_domain virtual host is working!”

Before I tried adding SSL and did all these steps, going to http://IP-address/wp-admin/ resulted in a WordPress login page and then I could edit my website. Now I get:

Not Found

The requested URL was not found on this server.

Apache/2.4.29 (Ubuntu) Server at <DOMAIN>.com Port 443

Hi @bobbyiliev,

root@XXX:~# sudo cat /etc/apache2/sites-enabled/<DOMAIN>.com-le-ssl.conf 
<IfModule mod_ssl.c>
<VirtualHost *:443>
	ServerAdmin webmaster@localhost    
	ServerName <DOMAIN>.com    
	ServerAlias www.<DOMAIN>.com    
	DocumentRoot /var/www/<DOMAIN>.com    
	ErrorLog ${APACHE_LOG_DIR}/error.log    
	CustomLog ${APACHE_LOG_DIR}/access.log combined

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/<DOMAIN>.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<DOMAIN>.com/privkey.pem
</VirtualHost>
</IfModule> 

Also to add on: going to www.<domain>.com I get:

Success! The your_domain virtual host is working!

Going to http://<IP>/wp-admin/ I used to be able to login to Wordpress and edit my site, now I get:

Not Found

The requested URL was not found on this server.

Apache/2.4.29 (Ubuntu) Server at <DOMAIN>.com Port 443

Hi @bobbyiliev I appreciate your help!

output to ls -lah /etc/apache2/sites-enabled:

xxx@xxx:~$ ls -lah /etc/apache2/sites-enabled
total 12K
drwxr-xr-x 2 www-data www-data 4.0K Jul 18 03:40 .
drwxrwxr-x 8 www-data www-data 4.0K Jul 19 20:52 ..
-rw-rw-r-- 1 www-data www-data  523 May 25 19:43 000-default.conf
lrwxrwxrwx 1 root     root       54 Jul 18 03:11 <DOMAIN_NAME_HERE>.com-le-ssl.conf -> /etc/apache2/sites-available/<DOMAIN_NAME_HERE>-le-ssl.conf
lrwxrwxrwx 1 root     root       41 Jul 18 03:40 <DOMAIN_NAME_HERE>.com.conf -> ../sites-available/<DOMAIN_NAME_HERE>.com.conf

output for sudo cat /etc/apache2/sites/enabled/your-domain.conf: -there was no sites/ so went into sites-enabled/

root@XXX:/etc/apache2/sites-enabled# cat <DOMAIN_NAME_HERE>.com.conf 
<VirtualHost *:80>    
	ServerAdmin webmaster@localhost    
	ServerName <DOMAIN_NAME>.com    
	ServerAlias www.<DOMAIN_NAME>.com    
	DocumentRoot /var/www/<DOMAIN_NAME>.com    
	ErrorLog ${apache_log_dir}/error.log
	CustomLog ${apache_log_dir}/access.log combined
</VirtualHost>

error.log was empty.

Thanks!