Apache Virtual Hosts go to root and not documentroot

I've just routed my domains to go to my Linode but they map to my web root and not my document root I set in the apache config.

This is my config file for the domain I want to map

 <virtualhost *:80="">ServerAdmin shamist@gmail.com
     ServerName thevorticon.com
     ServerAlias www.thevorticon.com
     DocumentRoot /srv/www/thevorticon</virtualhost> 

and it seems as if it maps to /src/www and not the subfolder.

Any idea what could be wrong?

2 Replies

Did you restart Apache after editing the configuration?

apachectl -k graceful

If that's not it, did you enable the virtual host? That is, do you have a link pointing from the sites-enabled directory to the config file in sites-available?

I took out the default vhost files and it worked. Not sure why I didn't think of that.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct