Question

Virtualhost appear instead of my wordpress

Posted February 15, 2021 166 views
WordPressLet's EncryptUbuntu 18.04

Hello people. Hope you can help me, my name is Camilo, from CL.

As I was following through the tutorial (https://www.digitalocean.com/community/tutorials/como-proteger-apache-con-let-s-encrypt-en-ubuntu-18-04-es), I tried to install SSL certificate for my domain.

I did every step that is pointed in the tutorial, but at the end, I opened my domain and the main page shows me “Welcome to zitaparts.cl!
Success! The zitaparts.cl virtual host is working!” (obviously I wrote that creating virtual host). You can check this –> https://zitaparts.cl

But, the main issue here is I can’t access to my wordpress site for my business, and less important, I don’t know if I did properly the install of SSL Certificate.

Just want to revert everything or put the right code to show my wordpress instead host virtual

Best !

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.

×
Submit an Answer
1 answer

Hello, @zitachile

At the moment the site is secured with a Let’s Encrypt SSL certificate. What you need to do is to update the document root for the domain name in the virtual host and point it to the WordPress installation directory.

You can open the virtual hosts file with any text editor and edit the DocumentRoot path to match the directory of the WordPress install.

  • nano /etc/apache2/sites-available/your_domain.conf

And then alter this line:

DocumentRoot /var/www/your_domain

once this is done you can save the file and then check the Apache configuration for any syntax errors:

  • sudo apache2ctl configtest

You should see the following output:

Syntax OK

Restart Apache to implement your changes:

  • sudo systemctl restart apache2

Your domain should now be loading the WordPress installation when visited.

Hope that this helps!
Regards,
Alex