URL without "/virtualradar" says Bad Request

Are you having trouble getting Virtual Radar Server installed and running? If so then this is the place to ask about it.
Ludwig
Posts: 17
Joined: Fri Aug 16, 2013 8:40 am
Location: Frankfurt
Contact:

URL without "/virtualradar" says Bad Request

Postby Ludwig » Wed Aug 28, 2013 5:55 pm

Hello world,

I have installed Virtual Radar Server and it works really good. But I have one problem: When connecting directly to my domain (http://planes.webernetz.net/), a simple html page says:
Bad Request (Invalid Hostname)
Only when I type in the fully name "http://planes.webernetz.net/virtualradar/" it works.

How can I fix that?
(Please do not tell me that it is mandatory to use this "/virtualradar" notation... ;))

Thx,
Ludwig

agw
Posts: 1896
Joined: Fri Feb 17, 2012 3:20 am

Re: URL without "/virtualradar" says Bad Request

Postby agw » Wed Aug 28, 2013 11:54 pm

I'm afraid it's mandatory :) VRS uses the built-in HTTP.SYS web server under Windows and that lets different applications all listen on the same port by letting them specify different roots. VRS uses the VirtualRadar root. On Windows Vista and upwards Windows won't let user-mode programs use HTTP.SYS without permissions set by an administrator account. When you run the installer it runs as admin and sets the permissions for HTTP.SYS, and those permissions specify the VirtualRadar root. So the root and the port are baked in by the installer, and while you can change the port by reinstalling you cannot change the root.

It would be possible to build your own version of VRS with a different root, or no root at all, but you'll either have to run it as administrator or manually assign permissions at the command-line for VRS to listen on the new root.

Ludwig
Posts: 17
Joined: Fri Aug 16, 2013 8:40 am
Location: Frankfurt
Contact:

Re: URL without "/virtualradar" says Bad Request

Postby Ludwig » Thu Aug 29, 2013 9:00 pm

Hm, okay, I understand the issue. However, maybe it's possible to write a simple redirect html page into the document root that forwards the http request to "/virtualradar"? Do you have an idea?
Where can I find information about the http.sys that ships with Windows? When asking Google, all pages refer to IIS. Is the http.sys you are using the same as in IIS?

Thanks a lot!
Ludwig

agw
Posts: 1896
Joined: Fri Feb 17, 2012 3:20 am

Re: URL without "/virtualradar" says Bad Request

Postby agw » Thu Aug 29, 2013 11:22 pm

Ludwig wrote:maybe it's possible to write a simple redirect html page into the document root that forwards the http request to "/virtualradar"?


VRS can't do this because it'd still be using the VirtualRadar root. If you don't mind installing a web server, such as Apache, onto your machine then you can either write a web page that hosts the VRS web page in an iframe or, for a cleaner look but with a little more effort, configure Apache as a forward proxy to VRS. It seems like a lot of effort to go to to avoid typing /virtualradar though :)

Ludwig wrote:Where can I find information about the http.sys that ships with Windows? ... Is the http.sys you are using the same as in IIS?


IIS is one application that uses HTTP.SYS, VRS is also using it via .NET's HttpListener (http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx). There's a write-up of HTTP.SYS on CodeProject that explains the relationship between HTTP.SYS, IIS and .NET applications here: http://www.codeproject.com/Articles/437733/Demystify-http-sys-with-HttpSysManager and if you're after the documentation for HTTP.SYS' API then it's here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364510(v=vs.85).aspx.

Ludwig
Posts: 17
Joined: Fri Aug 16, 2013 8:40 am
Location: Frankfurt
Contact:

Re: URL without "/virtualradar" says Bad Request

Postby Ludwig » Fri Aug 30, 2013 5:50 pm

agw wrote:VRS can't do this because it'd still be using the VirtualRadar root.

Yes, this is ok. But maybe one could provide an additional and *really* simple program that listens on the root directory and simply forwards all requests to "url/virtualradar"?

agw wrote:If you don't mind installing a web server, such as Apache, onto your machine then you can either write a web page that hosts the VRS web page in an iframe or, for a cleaner look but with a little more effort, configure Apache as a forward proxy to VRS.

Hm, okay, this would work if VRS listens on a port other than 80. Using an iframe might work, but I think its not the good way (as you have said...). And configuring a forward proxy is a little bit to overwhelmed (as you have said, too ;)).

Anyway, thanks for the links! Maybe I can find out something more!

agw
Posts: 1896
Joined: Fri Feb 17, 2012 3:20 am

Re: URL without "/virtualradar" says Bad Request

Postby agw » Sun Sep 01, 2013 3:45 pm

It shouldn't be too hard to write something that redirects the browser from one root to another, but at the moment any spare time I have to work on VRS is going into version 2. Once that's out I can take a look at it.

Ludwig
Posts: 17
Joined: Fri Aug 16, 2013 8:40 am
Location: Frankfurt
Contact:

Re: URL without "/virtualradar" says Bad Request

Postby Ludwig » Wed Mar 19, 2014 8:17 pm

*ping*

Any time for that issue? ;) I still think it would be a nice feature to have.

ernieek
Posts: 11
Joined: Tue Aug 01, 2017 9:12 am
Location: Tilburg - NL
Contact:

Re: URL without "/virtualradar" says Bad Request

Postby ernieek » Tue Aug 01, 2017 12:46 pm

Hello,

i have a solution found.

install MS iis server.

remove all files in the root folder of the default website in iis

put a web.config with the following:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true">
<add wildcard="/" destination="/virtualradar" />
</httpRedirect>
<httpErrors errorMode="Custom" defaultResponseMode="Redirect">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>


you can place in C:\inetpub\wwwroot you own stuf and website the virtual radar will be still availeblo on http://<hostname>/virtualradar

Kind regards Erwin


Return to “Installation Problems”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest