[Tfug] !@#$% apache and virtual hosts...

George Cohn gwcohn at simplybits.net
Thu Sep 6 17:50:09 MST 2007


Christopher Robbins wrote:
> As you can tell by the headline, I'm a bit annoyed...
> 
> Working on setting up apache with virtual hosts...I've followed the docs,
> but it's getting....weird.  When
> I start up apache, here's what I get -
> 
> ml61:/etc/apache2 # /etc/init.d/apache2 restart
> Module "fastcgi" is not installed, ignoring.
> Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
> [Thu Sep 06 16:23:57 2007] [warn] NameVirtualHost *:80 has no VirtualHosts
> Syntax OK
> Starting httpd2 (prefork) [Thu Sep 06 16:23:57 2007] [warn] NameVirtualHost
> *:80 has no VirtualHosts
>                                                                       done
> WTF?  Where the hell does this -
> 
> [warn] NameVirtualHost *:80 has no VirtualHosts
> 
> come from?  I don't have that set anywhere in httpd.conf or listen.conf.
> I'm a bit at my wits end here.
> 
> Here's the tail of my httpd.conf -
> 
> <VirtualHost ml61.english.arizona.edu>
>   DocumentRoot /srv/www/htdocs
>   ServerName ml61.english.arizona.edu
> </VirtualHost>
> 
> <VirtualHost sawp.ml61.english.arizona.edu>
>   DocumentRoot /srv/www/htdocs/sawp
>   ServerName sawp.english.arizona.edu
> </VirtualHost>
> 
> Thoughts?  Ideas?  I'll owe you many thanks...Or perhaps a cold beer
> at the next happy hour.  :)
> 
>   - Chris

Usually with Apache 2, virtual hosts are set up something like this:

<VirtualHost 192.168.254.4:80>

ServerName mydomain.com
ServerAdmin gwcohn at simplybits.net
ServerAlias *.mydomain.com
ErrorLog /var/log/apache2/error.log

DocumentRoot /home/mydomain
ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/
AddHandler cgi-script .cgi .pl

<Directory "/home/mydomain/cgi-bin">
     AllowOverride None
     Options +ExecCGI
     Order allow,deny
     Allow from all
</Directory>


George Cohn




More information about the tfug mailing list