Report this

What is the reason for this report?

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

Posted on March 12, 2020

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>
        ServerAdmin mikhaelipcn@gmail.com

        ServerName revistaestilooff.com.br
        ServerAlias www.revistaestilooff.com.br

        DocumentRoot /var/www/estilo_off/

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

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

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



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!

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 @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
        </Directory>

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

Let me know how it goes! Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.