LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache Proxy and Browser Issues (https://www.linuxquestions.org/questions/linux-server-73/apache-proxy-and-browser-issues-710810/)

jbentley 03-11-2009 12:32 PM

Apache Proxy and Browser Issues
 
Good day,

I inherited a fairly functional website setup using Apache 2.2 that made use of mod_proxy and mod_balancer to pass requests from a proxy server to one of my two backend servers.

My proxy server drive crashed however, and I've been stuck trying to re-create the proxy and balancer setup. I'm at a state now where the proxying is working mostly, but my java is failing when accessed through IE yet works without issue in Firefox. The failure is coming on AJAX update calls.

The balancer/proxy setup:
ProxyRequests On

<Proxy balancer://balancer>
BalancerMember http://site1:80
BalancerMember http://site2:80
</Proxy>

ProxyPass / balancer://balancer/
ProxyPassReverse / balancer://balancer/

The apache access log, first from IE:
Code:

"POST /assets/assets/includes/file.php HTTP/1.1" 404 3332
"http://site/assets" "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705;
.NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"

and then from Firefox, the same action/site/page
Code:

"POST /assets/includes/file.php HTTP/1.1" 200 132
"http://site/assets/" "Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7"

The java/ajax call
Code:

Class.function(element1, element2, branch+"/assets/includes/file.php", PostString);
Based on my beginners understanding, Mozilla is correctly receiving only the site for the value of branch, whereas IE is getting the full url bar for the value of branch.

My question is, how can I convince IE to behave the same way that Firefox is?

Thank you in advance, and apologies if I mis-posted the topic here.

jbentley 03-12-2009 10:48 AM

Ok I have to revise my assessment of what is happening. This is not, as I thought, a browser issue.

Instead, what is happening is the following. If I connect to the site using the host entry I created for myself to simulate a dns entry, the site operates normally.

If I connect to the site through the direct IP address, then when it comes time to pass headers to java script for processing, it fails as it passes the entire header rather than the main site.

Examples:
Code:

dns/assets posted to java function:
Class.function(element1, element2, branch+"/assets/includes/file.php", PostString);
branch = ""

Code:

ip/assets posted to java function:
Class.function(element1, element2, branch+"/assets/includes/file.php", PostString);
branch=/assets

Thus when the IP address is used; which is what's available to my users, they cannot utilize aspects of the site which are reliant upon ajax calls. Given that this has come about as a part of having to recreate my proxy configuration, I _believe_ that it's a configuration issue within apache.conf or my virtualhost, but I'm inexperienced enough to not be certain.

Any insight is very much appreciated, thanks.

jbentley 03-12-2009 11:58 AM

Issue actually resolved courtesy of finding an old hardcoded value for ip that the scripts were using. Le sigh


All times are GMT -5. The time now is 09:49 AM.