By vinnyp96
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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!
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
- 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:
- 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:
- sudo tail -100 /var/log/apache2/error.log
Regards, Bobby
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.