I am trying to setup an online host on the new VPS using apache 2.x on the Ubuntu server.

When beginning apache I recieve the mistake " xxx.241.214.xxx:80 doesn't have VirtualHosts", and also the url for that site still indicates the default location meaning my virtual host file is not taking effect:

<VirtualHost xxx.241.214.xxx:80>
ServerName xxx.co.uk
ServerAlias www.xxx.co.uk
DocumentRoot /var/www/vhosts/xxx.co.uk/httpdocs/xxx.co.uk
</VirtualHost>

Help, I am not good whatsoever this server config stuff.

I understand it has been some time because you published your question however i thought id toss in my ideas

We presently operate a couple of internal sites for different reasons, these listen of normal port 80 and apache is to establish simply the following

Listen 80

NameVirtualHost *:80

# Site 1 Comment

<VirtualHost *:80>
  ServerName site1.intranet
  ServerAdmin administrator@whatever.com
  DocumentRoot /var/www/html/site1
</VirtualHost>

#  Site 2 Comment

<VirtualHost *:80>
  ServerName site2.intranet
  ServerAdmin administrator@whatever.com
  DocumentRoot /var/www/html/site2
</VirtualHost>

Our DNS is to establish to route http://site1.intranet etc towards the IP from the apache server and also the apache config does the relaxation.

I usually use

<VirtualHost *>

(and ISTR always getting problems indicating the IP and port number, that we think is the reason why I actually do it this way now).

My real question is: Does each virtual host need to have a specified DocumentRoot, which naturally needs to differ for that VHosts.

The purpose of my real question is: When the master server had /var/www since it's DocumentRoot, after which creating symbolic links for the other servers available, and indicating each VHosts Root when needed, would the work? Because I'm getting issues with the browser not serving in the pages despite the fact that I've specified each one of these configurations.

I want outside assistance urgently, since it's driving me across the bend.

See example below:

Listen 80

NameVirtualHost *:80

Site 1 Comment

ServerName www.site1.com ServerAdmin administrator@whatever.com DocumentRoot /home/Public/site1

Site 2 Comment

ServerName www.site2.com ServerAdmin administrator@whatever.com DocumentRoot /home/Public/site2