ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> httpd-users
httpd-users
[users@httpd] Why doesn't Apache bind socket to vhost's IP addr.?
by Ralph Grothe other posts by this author
Feb 28 2006 8:19AM messages near this date
Re: [users@httpd] directory index forbidden | Re: [users@httpd] Why doesn't Apache bind socket to vhost's IP addr.?
Hello,

I think I have a flaw in my httpd.conf somewhere,
but the httpd syntax check isn't complaining.

I use this httpd release on Fedora 3

# /usr/sbin/httpd -v
Server version: Apache/2.0.52
Server built:   Oct 15 2004 11:39:29

and it's a DSO build as supplied from Fedora 3

# /usr/sbin/httpd -l
Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c


This box has several NICs, of which two are used as private LAN
interconnects of cluster nodes
while one NIC is multihomed where one IP is the node's address
while the other is the application's (viz. webserver's) public
address.

I slightly modified apachectl to be -DVHOST switch aware.

In the main httpd.conf I thus have this inclusion

# sed -n 1103,1105p /etc/httpd/conf/httpd.conf
<IfDefine VHOST> 
    Include conf.d/vhosts.conf
</IfDefine> 


Because this webserver is also run with mod_ssl which I guess
per default is configured to run as a vhost,
in the module loading section close to the top of httpd.conf
mod_vhost is loaded irrespectible whether -DVHOST is passed or
not

# grep -A1 -B1 -in ^loadmodule\ vhost /etc/httpd/conf/httpd.conf
175-LoadModule dav_fs_module modules/mod_dav_fs.so
176:LoadModule vhost_alias_module modules/mod_vhost_alias.so
177-LoadModule negotiation_module modules/mod_negotiation.so


While the vhost container for mod_ssl is included pretty early

# grep -A1 -B1 -in 'include.*ssl.conf' /etc/httpd/conf/httpd.conf
220-<IfDefine SSL> 
221:    Include conf.d/ssl.conf
222-</IfDefine> 

the other vhost container is included as late as in line 1104
(see above)

This IP based vhost is configured very basically with only those
directives 
used which I considered minimally mandatory

# cat /etc/httpd/conf.d/vhosts.conf
<VirtualHost 192.168.2.2:80> 
    ServerName  tintin_ic1:80
    ServerAdmin root@localhost
    DocumentRoot /var/www/apache/html
    CustomLog   logs/ic1.log common
    ErrorLog    logs/ic1_error.log
    LogLevel    debug
</VirtualHost> 


As said the configtest is syntactically correct
which can easily be verified by putting some junk chars
in the above vhost container file.

Nevertheless, when I start the webserver I see no listening
socket
for this vhost's IP address,
but only those for the publich IP (ports 80 and 443).

I raised the LogLevel to debug but in error_log the only virtual
host
entries that appear on startup relate to the SSL container.

What have I missed?

Regards
Ralph

---------------------------------------------------------------------
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@[...].org
   "   from the digest: users-digest-unsubscribe@[...].org
For additional commands, e-mail: users-help@httpd.apache.org
Thread:
Ralph Grothe
Joshua Slive

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved