Virtualhost Not working-apache

As i set only one host enable all default conf are disabled then i create one more virtual host mean it redirect to first domain i use different sites also what ever while access it redirect to "“main domain”

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.

Hi there,

I could suggest a few things here:

  • Make sure that the new virtual host is enabled:
ls -lah /etc/apache2/sites-enabled/

If you do not see the site there, you can enable it with a2ensite.

  • Make sure that the document root is set to point to the correct directory where your new website files are stored at.

  • Make sure to check your error log:

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

Hope that this helps! Regards, Bobby