LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   VirtualHost Apache 2 Problem (https://www.linuxquestions.org/questions/linux-networking-3/virtualhost-apache-2-problem-282031/)

Chris_K1 01-25-2005 10:00 AM

VirtualHost Apache 2 Problem
 
Hi,

I'm a newbie to Linux and getting a bit confused about something. In apache 2, in the /etc/apache2/sites-avaliable/enabled dirs, are there meant to be a file for each website that you set up, or should there be only 1 file for all of the websites?

I have the latter, and after setting up 1 site that works perfectly fine, i get a
Quote:

[warn] NameVirtualHost xxx.xxx.xxx.xxx:80 has no VirtualHosts
error once i run the apache2ctl config test.

Here is the config file that seems to cause the error:

Quote:

NameVirtualHost xxx.xxx.xxx.xxx:80

<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName shop.domain.co.uk
ServerAdmin support@domain.com
DocumentRoot /var/www/shop.domain.co.uk
ScriptAlias /cgi-bin/ /var/www/shop.domain.co.uk/cgi-bin/
<Directory "/var/www/shop.domain.co.uk/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/shop.domain.co.uk/error.log
LogLevel warn
CustomLog /var/log/apache2/shop.domain.co.uk/access.log combined
</VirtualHost>
Can anyone see any problems with this file as i cant and especially as i copied this file from the one that works and have just edited it where it says 'shop.domain.co.uk'.


All times are GMT -5. The time now is 12:01 PM.