I setup the Apache virtual hosts but when i reach the domain, the server show the default page (/var/www/html)

I`m trying to setup a doplet for wordpress apps. So, i create a virtual host for my site which has this configurations:

UseCanonicalName On
<VirtualHost *:80>


        DocumentRoot /var/www/estilo_off/

        <Directory /var/www/estilo_off/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

After add this config with a2ssite and disable the 000-default with a2dssiste, i restar the apache2 but when i type the domain on browser, i`m getting the default page at /var/www/html

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there @mikhaelipcn,

What happens if you run an Apache config test with:

sudo apachectl-t 

Also the DocumentRoot should be specified without a trailing slash:

        DocumentRoot /var/www/estilo_off
        <Directory /var/www/estilo_off>
            Options FollowSymLinks
            AllowOverride All
            Require all granted

After that change, try to restart Apache and test the site again.

Let me know how it goes! Regards, Bobby