httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-François <gratt...@gmail.com>
Subject [users@httpd] vhost not receiving the connections
Date Mon, 10 Aug 2009 01:48:56 GMT
Hello,

I’m having an issue with serving the correct pages on my httpd with vhosts.

Basically (more config details follow, below), I’m running a server on
port 80 and wanted to add a vhost (named-based config) so that a
specific task is server by another server. Well, a vhost.

I don’t know why it’s like this, but right now it seems that whenever
I try to connect on the vhost, pages are served from the DocumentRoot
of the main server. Another thing: this is behind a firewall that
block port 80. The firewall redirects port 801 to port on the
concerned boxen.

Here’s a bit of config :

My main server is at w.dnsalias.net . My vhost is at x.dnsalias.net .
There is no name resolution issue, both hosts (x and y) resolve to the
same IP; I'm running apache v2.2.11 on a Solaris 10u5-x86 box.

The whole httpd (config, logs, docroot, etc) resides in
/tools/apache2/ . The way I want it set up is that my main server’s
DocumentRoot should use the default value which in this case should be
/tools/apache2/htdocs/ , and the vhosts should use
/tools/apache2/samples/ . As I mentioned above, seems like that
instead of going at /tools/apache2/samples/index.html when I navigate
to http://x.dnsalias.net:801/ (firewall redirects to port 80), it goes
in /tools/apache2/htdocs/index.html (the famous “it works!” page).

My main httpd.conf reads like this (of course I’ve left off parts not
pertinent to this issue):

ServerRoot “/tools/apache2”
Listen 80
ServerAdmin myEmailAddress@somewhere
ServerName w.dnsalias.net
DocumentRoot “/tools/apache2/htdocs”

Then, the very last line of the httpd.conf is :
Include conf/vhosts_jfg.conf

The file /tools/apache2/conf/vhosts_jfg.conf is this one (very short) :

NameVirtualHost w.dnsalias.net
NameVirtualHost x.dnsalias.net

<VirtualHost w.oslo.dnsalias.net:*>
    ServerAdmin me@somewhere.ca
   DocumentRoot "/tools/apache2/htdocs/"
    ServerName w.dnsalias.net
</VirtualHost>

<VirtualHost x.dnsalias.net:*>
    ServerAdmin me@somewhere.ca
   DocumentRoot "/tools/apache2/samples/"
    ServerName x.dnsalias.net
    ErrorLog "logs/x-error_log"
    CustomLog "logs/x-access_log" common
</VirtualHost>


I also noticed that logs/x-error_log and logs/x-acces_log are left
clean, no data is ever written there, which leads me to think that my
httpd seems to be ignoring my vhost altogether.

Do you people have an idea why my server is behaving like this ?

Thanks,

Jeff

---------------------------------------------------------------------
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