httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Kirby" <nick.ki...@freeuk.com>
Subject RE: [users@httpd] Virtual Hosting Causing Server to not start
Date Thu, 13 Jan 2005 15:56:44 GMT
Here is the Vhost part of the apache conf file.

#
# Use name-based virtual hosting.
#
#NameVirtualHost 192.168.1.3:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

#<VirtualHost 192.168.1.3:80>
#ServerName www.niknet.homeip.net
#DocumentRoot D:/apache/niknet
#ErrorLog D:/niknet/logs/error_log
#TransferLog D:/niknet/logs/access_log
#</VirtualHost>

#<VirtualHost 192.168.1.3:80>
#ServerName www.emma.homeip.net
#DocumentRoot D:/apache/emma
#ErrorLog D:/emma/logs/error_log
#TransferLog D:/emma/logs/access_log
#</VirtualHost>


The webserver fails to start if the second stanza is enabled. At the moment
the files are commented simply because the webserver will not start if they
are not.

I did read the Apache documentation, however this told me that everything I
was doing was ok.


-----Original Message-----
From: Nelson, Robert D. [mailto:RDNelson@Mail.Donaldson.com] 
Sent: 12 January 2005 23:39
To: 'users@httpd.apache.org'
Subject: RE: [users@httpd] Virtual Hosting Causing Server to not start

Nick:

> Trying to set the second vhost up to serve pages from an 
> entirely different
> domain causes the server to fail to restart, so my syntax is wrong.

Did you get an error message? If so, what was it?

> I am using name based vhosts on one IP address. Having looked 
> at the Apache
> files I have used only ServerName and DocumentRoot to attempt 
> to configure
> the vhosts.

Please post the relevant parts of your config file.

> Which parameter am I missing?

Again, we need to see the config file to know.

> Additionally, is it possible to have the Apache server create 
> a log file for
> each web vhosted website?

Yep. Simply add a log directive in each VirtualHost and point them to
different files, as in:

<VirtualHost>
    ServerName www.host1.com
    ErrorLog /location/of/logs/host1_error_log
    CustomLog /location/of/logs/host1_access_log combined
</VirtualHost>

<VirtualHost>
    ServerName www.host2.com
    ErrorLog /location/of/logs/host2_error_log
    CustomLog /location/of/logs/host2_access_log combined
</VirtualHost>

 ~ Robert


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message