You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by SkyFlash <we...@hackquest.de> on 2005/05/10 06:47:20 UTC
[users@httpd] Bug? Or not? Accessing server with numeric IP produces error page...
with VirtualHost setup
Good morning....
I have a problem with my Apache2 (2.0.52).
While checking how to calculate numeric IPs from my own I found out that
my webserver does not like it when I access it via the numeric IP.
I have my webserver set up with virtual hosts, so I do understand that
he has problems to figure out WHICH webpage to serve, but I had the
impression that in all cases when he does not know what domain is being
asked for he would just server the first webpage in the config.
Example:
If I access it via an IP (e.g. http://192.168.1.2/index.php) it all works.
When I do something like "http://123456789/index.php it will produce the
following page:
-----snip-----
Bad Request
Your browser sent a request that this server could not understand.
-----snip-----
Also it will log an error in the logfile.:
-----snip-----
[Tue May 10 06:34:08 2005] [error] [client 192.155.149.29] Client sent
malformed Host header
-----snip-----
Now my questions are...
1. Is that intended behaviour?
2. If not, is there something I can do to fix it?
3. Is there a workaround that would enable me to redirect those requests
to a specific virtual host by other means?
I did find a bug report from some years ago about the exact same
problem, but it was apparently fixed... so should it work?
Thanks for help!
---------------------------------------------------------------------
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] Bug? Or not? Accessing server with numeric IP produces
error page... with VirtualHost setup
Posted by SkyFlash <we...@hackquest.de>.
Well i actually found a different bug with the same topic... but this
one answers question 1+2 for me, thanks!
Now to question 3:
Lets pretend I want this to work on my server... is there anything I can
do to forward any request to a standard vhost, even if its an malformed one?
Thanks!
Chris wrote:
> A quick google search got me this:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=34595
>
> Chris
>
> SkyFlash wrote:
>
>> Good morning....
>>
>> I have a problem with my Apache2 (2.0.52).
>>
>> While checking how to calculate numeric IPs from my own I found out
>> that my webserver does not like it when I access it via the numeric IP.
>>
>> I have my webserver set up with virtual hosts, so I do understand that
>> he has problems to figure out WHICH webpage to serve, but I had the
>> impression that in all cases when he does not know what domain is
>> being asked for he would just server the first webpage in the config.
>>
>> Example:
>>
>> If I access it via an IP (e.g. http://192.168.1.2/index.php) it all
>> works.
>>
>> When I do something like "http://123456789/index.php it will produce
>> the following page:
>>
>> -----snip-----
>> Bad Request
>>
>> Your browser sent a request that this server could not understand.
>> -----snip-----
>>
>> Also it will log an error in the logfile.:
>>
>> -----snip-----
>> [Tue May 10 06:34:08 2005] [error] [client 192.155.149.29] Client sent
>> malformed Host header
>> -----snip-----
>>
>> Now my questions are...
>>
>> 1. Is that intended behaviour?
>> 2. If not, is there something I can do to fix it?
>> 3. Is there a workaround that would enable me to redirect those
>> requests to a specific virtual host by other means?
>>
>> I did find a bug report from some years ago about the exact same
>> problem, but it was apparently fixed... so should it work?
>>
>> Thanks for help!
---------------------------------------------------------------------
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] Bug? Or not? Accessing server with numeric IP produces
error page... with VirtualHost setup
Posted by Chris <li...@leftbrained.org>.
A quick google search got me this:
http://issues.apache.org/bugzilla/show_bug.cgi?id=34595
Chris
SkyFlash wrote:
> Good morning....
>
> I have a problem with my Apache2 (2.0.52).
>
> While checking how to calculate numeric IPs from my own I found out
> that my webserver does not like it when I access it via the numeric IP.
>
> I have my webserver set up with virtual hosts, so I do understand that
> he has problems to figure out WHICH webpage to serve, but I had the
> impression that in all cases when he does not know what domain is
> being asked for he would just server the first webpage in the config.
>
> Example:
>
> If I access it via an IP (e.g. http://192.168.1.2/index.php) it all
> works.
>
> When I do something like "http://123456789/index.php it will produce
> the following page:
>
> -----snip-----
> Bad Request
>
> Your browser sent a request that this server could not understand.
> -----snip-----
>
> Also it will log an error in the logfile.:
>
> -----snip-----
> [Tue May 10 06:34:08 2005] [error] [client 192.155.149.29] Client sent
> malformed Host header
> -----snip-----
>
> Now my questions are...
>
> 1. Is that intended behaviour?
> 2. If not, is there something I can do to fix it?
> 3. Is there a workaround that would enable me to redirect those
> requests to a specific virtual host by other means?
>
> I did find a bug report from some years ago about the exact same
> problem, but it was apparently fixed... so should it work?
>
> Thanks for help!
>
>
>
> ---------------------------------------------------------------------
> 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