httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jérôme Tytgat <>
Subject [users@httpd] Mod_proxy and javascript problem
Date Thu, 25 Aug 2005 14:54:52 GMT
Hello community.

I'm trying to set up a reverse proxy under apache 2.0.54 (debian version).

The server i'm proxy reversing is a IIS 6.0 with class server on it (a
microsoft application for school networking).

I'm using mod_security, rewriterules and proxy for the reverse proxy and some of
virtual hosting because I'm masking 3 IIS server behind a linux/apache

Each server is reached as follow : goes to server1 ( goes to server2 ( goes to server3 ( goes to stats on the apache server

The big problem is that some javascript (.js) are not correctly interpreted
on the browser, so the html page is broken.

My vhost looks like this :

<VirtualHost *:443>
        SSLEngine On
        SSLProxyEngine on
        SSLCACertificateFile /etc/apache2/ssl/cacert.pem
        #SSLCertificateFile /etc/apache2/ssl/
        #SSLCertificateKeyFile /etc/apache2/ssl/
        SSLCertificateFile /etc/apache2/ssl/newcert.pem
        SSLCertificateKeyFile /etc/apache2/ssl/private.key


        CustomLog /var/log/apache2/ combined
        ErrorLog /var/log/apache2/

        RewriteEngine on
        RewriteOptions inherit
        RewriteLog "/var/log/apache2/"
        RewriteLogLevel 0

        ProxyRequests off
        ProxyVia Off
        ProxyErrorOverride Off
        ProxyPreserveHost Off
        <Proxy *>
                Order Deny,Allow
                Allow from all

        # RewriteRules

        RewriteRule ^/sst$     [R,NC]
        RewriteRule ^/sst/$    [R,NC]

        RewriteRule ^/class$   [R,NC]
        RewriteRule ^/class/class(.*)$$1 [R,NC]

        RewriteRule ^/prod$    [R,NC]
        RewriteRule ^/prod/prod(.*)$$1 [R,NC]

        RewriteCond %{HTTP_REFERER}     ^https://(www\.)?*$ [NC]
        RewriteCond %{REQUEST_URI}      !^/class/.*$ [NC]
        RewriteRule ^/(.*)$   $1 [R]

        RewriteCond %{HTTP_REFERER}     ^https://(www\.)?*$ [NC]
        RewriteCond %{REQUEST_URI}      !^/prod/.*$ [NC]
        RewriteRule ^/(.*)$   $1 [R]

        RewriteRule ^/prod/(.*)$$1 [P,L,NC]
        RewriteRule ^/class/(.*)$$1 [P,L,NC]

        RewriteCond %{REQUEST_URI}      !^/sst/.*$ [NC]
        RewriteRule ^/(.*)$   $1 [P,L]

        ProxyPassReverse /prod/
        ProxyPassReverse /class/
        ProxyPassReverse /    

        SecAuditLog /var/log/apache2/

Of course I'm limited in debugging because the class server application needs IE 6.0...

The Html source page is the same if I go directly to the server or if I go through the proxy
(BODY, HEAD and HTML tags have been commented out)

<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<!-- _localBinding --><!-- _lcid="1036" _version="" -->

<script language="jscript" src="/CSInc/Admin/Admin.js"></script>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Microsoft Class Server - Page d'accueil de l'administrateur</TITLE>

<!--BODY border=0 bordercolor=silver leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0
class=clsTopFrameBody style="border:0px; margin:0px;">

<FORM action="StudentBrowse.htm" method="POST" id=HOME name=HOME>

<link rel="stylesheet" type="text/css" href="/CSInc/Admin/Admin.css">

<TABLE class="clsTable" style="color:white; width:100%; height=42pt" cellpadding=0 cellspacing=0>
	<TR style="background-color:#663333; height:8%;" cellpadding=0 cellspacing=0>
		<TD colspan="3" class="clsOperationTitleTD" style="vertical-align:middle;" >Administrateur
Microsoft Class Server </TD>
		<td align=right style="font-weight:normal">
			<span style="color:#CC9999;" name=HOMEREF id=HOMEREF align=left ><B>Accueil</B></span>&nbsp
| &nbsp
			<span class=clsSpanLink tabindex=1 name=LOGOFFREF id=LOGOFFREF m_strAction="Signout.htm"
style="behavior:url(/CSInc/Admin/;" title="Cliquez pour quitter le site Web de l'administrateur
sans fermer votre navigateur">Déconnexion</span>&nbsp | &nbsp
			<a tabindex=2 href="Help.htm" target="_search" title="Afficher l'aide en ligne"><B>Aide</B></a>&nbsp&nbsp
	<TR style="color:#996666; height:12%;" cellpadding=0 cellspacing=0>
		<TD valign=bottom></TD>
	<TR style="line-height:0pt;">
				<TR style="line-height:0pt;">
<TABLE style="color:blue; width:100%;height=40pt" cellpadding=0 cellspacing=0>
	<TR cellpadding=0 cellspacing=0>

<TABLE style="color:blue; width:100%; font-size:9pt" cellpadding=0 cellspacing=0 border=0>
	<TR style="color:#663333; height: 26pt;" cellpadding=0 cellspacing=0>
		<TD width=20%>&nbsp</TD>
		<TD colspan=2 class="clsOperationTitleTD" style="vertical-align:middle;" > Les administrateurs
peuvent ajouter ou modifier&nbsp;:</TD>
	<TR style="height:26pt;" cellpadding=0 cellspacing=0>
		<td m_strAction="TeacherBrowse.htm" style="behavior:url(/CSInc/Admin/;" tabindex=3><span
name=TREF id=TREF>&nbsp <LI><U><B>Informations sur les enseignants</U></B></span></LI></td>
		<TD width=40%>&nbsp</TD>
	<TR style="height:26pt;" cellpadding=0 cellspacing=0>
		<td m_strAction="ClassBrowse.htm" style="behavior:url(/CSInc/Admin/;" tabindex=4><span
name=CREF id=CREF>&nbsp <LI></LI><U><B>Informations sur les
	<TR style="height:26pt;" cellpadding=0 cellspacing=0>
		<td m_strAction="StudentBrowse.htm" style="behavior:url(/CSInc/Admin/;" tabindex=5><span
name=SREF id=SREF>&nbsp <LI></LI><U><B>Informations sur les
	<TR style="height:26pt;" cellpadding="0" cellspacing="0">
		<td colspan=2 m_strAction="School/Home.htm" style="behavior:url(/CSInc/Admin/;"
tabindex="5"><span name="SREF" id="Span1">&nbsp <LI></LI><B><U>Page
d'accueil de l'établissement</U></B></span></td>

<INPUT type="hidden" value='0' id=InList1Hid name=InList1Hid style="width:0px; height:0px;


What is not working are the following type of links :
- <td m_strAction="ClassBrowse.htm" style="behavior:url(/CSInc/Admin/;" tabindex=4><span
name=CREF id=CREF>&nbsp <LI></LI><U><B>Informations sur les
- <td m_strAction="StudentBrowse.htm" style="behavior:url(/CSInc/Admin/;" tabindex=5><span
name=SREF id=SREF>&nbsp <LI></LI><U><B>Informations sur les

I can post the javascript but it's quite long (I will on users demands).

Anyway it's looks like mod_proxy cannot proxy correctly some javascript, maybe
someone can help me ?


PS: Please, forgive my bad english...
PS2: mod_security does not looks like to be the problem as desactivating it does not change

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message