Page 1 of 1

Bad Request (Invalid Hostname)

PostPosted: 09. March 2014 16:22
by dunhill
I have a new install of ubuntu and apache 2.2.22

it is running on a Virtual on Windows (192.168.0.2) server using virtualbox. The Ubuntu virtual ip is 192.168.0.31 in bridged mode
The router is configured so that a DMZ is defined to pass all traffic to the Ubuntu Server
WEBMIN is running on the Ubuntu server on port 10000 as well

internally I can access the web site at 192.168.0.31 with no issues from any computer on the same subnet
if I try to access via external IP address or DNS name I get the error Bad Request (Invalid Hostname)

I can access the webmin interface from DNS name and external ip

There is only the one virtual server defined in apache with the following
Handles the name-based server on address *.
Address Any
Port 80 Server Name Automatic
Document Root /var/www


I know this is something basic but have not used Apache in 10+ years. Any help appreciated

Re: Bad Request (Invalid Hostname)

PostPosted: 09. March 2014 16:30
by Nobbie
The message

Bad Request (Invalid Hostname)

is NOT an Apache message (and therefore not a Xampp message), it is a message from Microsoft IIS. Obviously you are running another Webserver on your (Virtual?) Server. Use Google for more information about "Bad Request (Invalid Hostname)".

Re: Bad Request (Invalid Hostname)

PostPosted: 12. March 2014 20:18
by dunhill
Thank You Nobbie.

You were quite right the Windows Home Server has IIS Running which has some services used to manage the server. When I moved the Virtual to a different computer the problem persisted.

Turns out the router had Upnp enabled and the Windows Home Server was using that to modify the settings I had been adding in the management of the router.