Forum  General Visual ...  How do I...?  WGX Application doesn't work with Apache(2) reverse proxy
Previous Previous
 
Next Next
New Post 1/17/2012 3:06 PM
  jasb1
9 posts
No Ranking


WGX Application doesn't work with Apache(2) reverse proxy 

Howdy,

On My datacenter, I have several sites running on the windows server, and since I have 2 ISP connections, one with more BW than other, and WGX required more, like I've done for other sites, the connection with higher BW It's redirected to the Linux server, and I redirect things to the Windows server using apache's reverse proxy function.

So far I only had a problem with an veryyy old version of dotnetnuke, and not with WGX.

Does anyone did this test already?
It seems that some things aren't load, for example on a simple login form, the "round" loading circle, is loading but doesn't get out of there and the rest of the informating isn't shown.

Ideias?

Apache reverse proxy if very usefull on my case, but for certain other proble use other kind of reverse proxy's, software or hardware.

 
New Post 1/20/2012 1:28 PM
  palli
11824 posts
1st Level Poster




Re: WGX Application doesn't work with Apache(2) reverse proxy 

Hi jasb1,

I'm a little unclear what you are asking about here, as you state in your text that you have problems with some applications, but "... not with WGX". Does this mean that you don't have a problem with Visual WebGui in this scenario, or is this a typo ?

If this is a typo and you do have problems with Visual WebGui, then you may want to look into the "Force" settings you can place in web.config here.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 1/20/2012 1:52 PM
  jasb
279 posts
4th Level Poster


Re: WGX Application doesn't work with Apache(2) reverse proxy 

Hi Palli,

Doesn't seem to solve it.
I've added:

     <ForceDomain Value="hcp-proxy.mydomain.pt" />
      <ForcePort Value="80" />
      <ForceVirtualDirectory Value="/" />

and nothing.

Let me try to explain again.
I have a windows server, with an fixed IP, when i set my domain to that IP, hcp.mydomain.pt, WGX works OK, since it's pointing directly to the server, but this extra IP that i have has low BW so I need to use reverse proxy.
I have a Linux server with apache, that I do reverse proxy for 99% of the websites on the windows server, in this new scenario it is (the normal that works with all websites, less WGX):

Linux server (IP 2.2.2.2 (fake))=>apache=>windows server
Defined hcp.mydomain.pt to point 2.2.2.2 IP, and created an extra domain so that apache reverse proxy knows where to connect:
hcp-proxy.mydomain.pt with 192.168.1.226 (the internal network IP)

Apache reverse proxy configuration:

<VirtualHost *>
        ServerName hcp.mydomain.pt

        AddDefaultCharset utf-8

        ProxyPass / http://hcp-proxy.mydomain.pt/
        ProxyPassReverse / http://hcp-proxy.mydomain.pt/
</VirtualHost>

So, the linux server receives the request, sends it to the windows server via the internal IP, and receives requests back, and apache sends them to the browser/client that requested them, and voilá, with a single fixed IP I have both linux and windows servers.

The bad part as I said, is that is doesn't complete loading.

Any idea to make this work?
Here's a SC of it:
http://neotrix.decimal.pt/bugs/hcp-proxy.jpg

 
New Post 1/21/2012 2:18 PM
  palli
11824 posts
1st Level Poster




Re: WGX Application doesn't work with Apache(2) reverse proxy 
Modified By palli  on 1/21/2012 6:22:14 PM)

Hi Jorge,

I think you may have got it reversed, or I am not understanding you correctly.

My understanding is that web addresses are the following:

- hcp.mydomain.pt  = the externally known address of your applications (for use for external clients)

- hcp-proxy.mydomain.pt = the inernal (and local) address of your application, one that works for internal clients.

If this is correct then you have got the force settings wrong.

Think of it this way. When Visual WebGui renderes it's contents, the resulting resources (Html, JS, etc.) will contain a bunch of fully qualified Urls that will reference something within your application. By default, Visual WebGui will render these fully qualified Urls with the default address of your application, which in this case is http://hcp-proxy.mydomain.pt. This is what happes for inside users when they access your application via the http://hcp-proxy.mydomain.pt address.

For external users, they will request your application via http://hcp.mydomain.pt, which will be intercepted by the proxy and reverse-proxy-ed to your internal http://hcp-proxy.mydomain.pt. When your Visual WebGui application receives that request, it still thinks it's beeing addressed by http://hcp-proxy.mydomain.pt (that's the purpose of the revers proxy), so it will render all it's contents with all fully qualified Urls pointing that way. When that response is received by the client, say it's a reference to a javascript resource, the client will try to load it, and it will request it at http://hcp-proxy.mydomain.pt, as that's what the response will tell it to do.

Here is where the ForceDomain will kick in, and you want to set it to "http://hcp.mydomain.pt" as that's where the proxy will receive it and reverse-proxy it correctly. Same with the ForcePort, meaning that if the reverse-proxy is proxying your application on a different port than the port used for reverse-proxying, then you will have to force a different port etc.

You should pay attention to the fact that if you have internal users (users inside of the reverse-proxy) that will use this same application without going through the proxy, they will also be affected by the ForceDomain setting, so if your internal (local) dns is not pointing the hcp-proxy.mydomain.net to a local address, they will also go through the proxy address and be reverse proxy-ed. If that is a problem, you may have to set up a seperate application within IIS to serve local clients.

Hope this explains, but don't hesitate to ask if you need further help.

Palli

 

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 1/21/2012 2:31 PM
  jasb
279 posts
4th Level Poster


Re: WGX Application doesn't work with Apache(2) reverse proxy 

Palli,

Thanks for you HUGE explanation on a saturday night!

I've managed it to work as I understood now, external domain its what matters.

Thanks again!

 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  WGX Application doesn't work with Apache(2) reverse proxy
CompanionKit Bottom
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS