You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Forrest Aldrich <fo...@forrie.com> on 2003/06/03 03:05:32 UTC

[users@httpd] httpd.conf / NameVirtualHost anomaly

I've been having an odd problem with Apache 1.3.27 and VirtualHosts.

I have several VirtualHost entries.  The NameVirtualHost is set to the 
machine's IP.

One site I host is technology-based, and (ironically) a friend's 
belly-dancing information site.    If I don't set a VirtualHost with the 
host ip AND to the virtual directory of the tech company, people get the 
belly-dancing site!

While it's funny, it's been a source of frustration.

I've checked the context of the configuration over and over, read the 
docs.. and cannot figure out why this is happening.

Here's an extract/example of the first entries I have in my config about this:

NameVirtualHost 24.xx.xx.xx

<VirtualHost 24.xx.xx.xx>

     ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
     ServerAdmin forrie@thecompany.com
     DocumentRoot    /usr/local/apache/virtual/thecompany.com
     CustomLog   /var/log/apache/thecmopany.com/httpd-access.log combined
     ErrorLog    /var/log/apache/thecompany.com/httpd-error.log
     ServerName  thecompany.com

</VirtualHost>

Plus an entry for the actual machine name with it's real FQHN:

<VirtualHost myhost.ne.client2.attbi.com>

     ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
     ServerAdmin forrie@forrie.com
     DocumentRoot    /usr/local/apache/htdocs
     ServerName  myhost.ne.client2.attbi.com

</VirtualHost>


And from there, several virtualhost entries that are very vanilla/basic.

Has anyone else run into this problem before...


Thanks,
Forrest




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


Re: [users@httpd] httpd.conf / NameVirtualHost anomaly

Posted by Forrest Aldrich <fo...@forrie.com>.
I ran into another issue where I changed /etc/hosts and removed my FQHN 
from 127.0.0.1 and then readjusted the default NameVirtualHost to be my 
actual serverroot.

If I remove a hosted site (comment it out), restart httpd, and try to visit 
the URL, it points to my default page -- I think I understand why; but 
isn't there a way to catch the request (being something other than my 
primary site) and redirect that to a 404 Error?



Forrest


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


Re: [users@httpd] httpd.conf / NameVirtualHost anomaly

Posted by Jean Piere Nurcahyo Sumarno <ma...@ai3.itb.ac.id>.
Hi, I see. Sorry if I'm wrong predict your problem.  But probably you can
check your setting in the VirtualHost like belows. The failure in writing
the comas or others character here, will caused your hosting server
failed.

> > > <VirtualHost myhost.ne.client2.attbi.com>
> > >
> > >      ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
> > >      ServerAdmin forrie@forrie.com
> > >      DocumentRoot    /usr/local/apache/htdocs
> > >      ServerName  myhost.ne.client2.attbi.com
> > >
> > > </VirtualHost>
> > >

If you finished, then restart your apache. I hope it will help your
problem. 

Regards,
Marno


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


Re: [users@httpd] httpd.conf / NameVirtualHost anomaly

Posted by Forrest Aldrich <fo...@forrie.com>.
I have named/BIND-9 running on my FreeBSD-4.8 gateway, so all is there.   I 
don't host my zones there, they're hosted at the registrar.   So, my 
machine is <name>.ne.client2.attbi.com -- but the IP address is constantly 
renewed (I've had it for more than 1 year).   The forward and reverse are 
correct for the IP address.

I also have hardcoded the stuff in /etc/hosts, with host.conf specifyin to 
look there first.

So I'm not really sure where you think the problem is.


Thanks,
Forrest



At 11:42 PM 6/2/2003, you wrote:
>Hi Aldrich, I have tried it too and it shown that giving the IP number in
>apache virtual host  server will always failed like yours. But if you used
>a dns server, your pointing to IP address number will be success :-).
>
>It seem you need build a dns server. But it will need a negotiation with
>your ISP (if you are not an ISP) firstly. About dns server you could
>search in google (htp://www.google.com). It is not an apache
>application. Thankyou.
>
>Regards,
>Marno
>
>On Mon, 2 Jun 2003, Forrest Aldrich wrote:
>
> >
> > I've been having an odd problem with Apache 1.3.27 and VirtualHosts.
> >
> > I have several VirtualHost entries.  The NameVirtualHost is set to the
> > machine's IP.
> >
> > One site I host is technology-based, and (ironically) a friend's
> > belly-dancing information site.    If I don't set a VirtualHost with the
> > host ip AND to the virtual directory of the tech company, people get the
> > belly-dancing site!
> >
> > While it's funny, it's been a source of frustration.
> >
> > I've checked the context of the configuration over and over, read the
> > docs.. and cannot figure out why this is happening.
> >
> > Here's an extract/example of the first entries I have in my config 
> about this:
> >
> > NameVirtualHost 24.xx.xx.xx
> >
> > <VirtualHost 24.xx.xx.xx>
> >
> >      ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
> >      ServerAdmin forrie@thecompany.com
> >      DocumentRoot    /usr/local/apache/virtual/thecompany.com
> >      CustomLog   /var/log/apache/thecmopany.com/httpd-access.log combined
> >      ErrorLog    /var/log/apache/thecompany.com/httpd-error.log
> >      ServerName  thecompany.com
> >
> > </VirtualHost>
> >
> > Plus an entry for the actual machine name with it's real FQHN:
> >
> > <VirtualHost myhost.ne.client2.attbi.com>
> >
> >      ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
> >      ServerAdmin forrie@forrie.com
> >      DocumentRoot    /usr/local/apache/htdocs
> >      ServerName  myhost.ne.client2.attbi.com
> >
> > </VirtualHost>
> >
> >
> > And from there, several virtualhost entries that are very vanilla/basic.
> >
> > Has anyone else run into this problem before...
> >
> >
> > Thanks,
> > Forrest
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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


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


Re: [users@httpd] httpd.conf / NameVirtualHost anomaly

Posted by Jean Piere Nurcahyo Sumarno <ma...@ai3.itb.ac.id>.
Hi Aldrich, I have tried it too and it shown that giving the IP number in
apache virtual host  server will always failed like yours. But if you used
a dns server, your pointing to IP address number will be success :-).

It seem you need build a dns server. But it will need a negotiation with
your ISP (if you are not an ISP) firstly. About dns server you could
search in google (htp://www.google.com). It is not an apache
application. Thankyou.

Regards,
Marno

On Mon, 2 Jun 2003, Forrest Aldrich wrote:

> 
> I've been having an odd problem with Apache 1.3.27 and VirtualHosts.
> 
> I have several VirtualHost entries.  The NameVirtualHost is set to the 
> machine's IP.
> 
> One site I host is technology-based, and (ironically) a friend's 
> belly-dancing information site.    If I don't set a VirtualHost with the 
> host ip AND to the virtual directory of the tech company, people get the 
> belly-dancing site!
> 
> While it's funny, it's been a source of frustration.
> 
> I've checked the context of the configuration over and over, read the 
> docs.. and cannot figure out why this is happening.
> 
> Here's an extract/example of the first entries I have in my config about this:
> 
> NameVirtualHost 24.xx.xx.xx
> 
> <VirtualHost 24.xx.xx.xx>
> 
>      ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
>      ServerAdmin forrie@thecompany.com
>      DocumentRoot    /usr/local/apache/virtual/thecompany.com
>      CustomLog   /var/log/apache/thecmopany.com/httpd-access.log combined
>      ErrorLog    /var/log/apache/thecompany.com/httpd-error.log
>      ServerName  thecompany.com
> 
> </VirtualHost>
> 
> Plus an entry for the actual machine name with it's real FQHN:
> 
> <VirtualHost myhost.ne.client2.attbi.com>
> 
>      ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
>      ServerAdmin forrie@forrie.com
>      DocumentRoot    /usr/local/apache/htdocs
>      ServerName  myhost.ne.client2.attbi.com
> 
> </VirtualHost>
> 
> 
> And from there, several virtualhost entries that are very vanilla/basic.
> 
> Has anyone else run into this problem before...
> 
> 
> Thanks,
> Forrest
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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