httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jérôme Tytgat <>
Subject Re: [users@httpd] Mod_proxy and javascript problem
Date Fri, 26 Aug 2005 08:05:54 GMT
That's a good starting point.

I've redone the vhost like that :
<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

        #ProxyPass /prod/
        #ProxyPass /class/
        ProxyHTMLURLMap /class
        ProxyHTMLURLMap /prod

        <Location "/prod/">
            SetOutputFilter      proxy-html
            ProxyHTMLURLMap / /prod/
            ProxyHTMLURLMap /prod /prod
        <Location "/class/">
            SetOutputFilter      proxy-html
            ProxyHTMLURLMap / /class/
            ProxyHTMLURLMap /class /class
        <Location "/">
        #    ProxyPass


        Alias /sst/stats-icon/ /usr/share/stats/icon/
        ScriptAlias /sst/cgi-bin/ /usr/lib/cgi-bin/
        #ScriptAlias /sst/cgi-bin/ /usr/lib/cgi-bin/plouf/
        Alias /sst/     /usr/share/stats/
        <Location "/sst/">
                SecFilterEngine Off
                Options None
                AllowOverride None
                Order Deny,Allow
                Allow from all
                AuthName "Statistiques"
                AuthType Digest
                AuthDigestFile /var/www/plouf/.htpasswd-digest
                require valid-user

        <Directory /var/lib/stats>
                Options None
                AllowOverride None
                Order Deny,Allow
        <Directory /usr/share/stats>
                Options None
                AllowOverride None
                Order Deny,Allow

        # 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]
        RewriteRule ^/totoloc/(.*)$$1 [P,L,NC]

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

        #ProxyPassReverse /prod/
        #ProxyPassReverse /class/
        #ProxyPassReverse /totoloc/
        #ProxyPassReverse /    

        SecAuditLog /var/log/apache2/

I've first tested with only the proxy/proxypass directive and at least it's working like
before for the rest of the webservers but my rewriterules are not working anymore
(looks like mod_proxy have some precedence on mod_rewrite).

So i've put again the rewrite rules.

In both case the html page is somewhat messed up now :

<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<!-- _localBinding --><!-- _lcid="1036" _version="" -->
<script language="jscript" src="/class/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="/class/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>&amp;nbsp
| &amp;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>&amp;nbsp | &amp;nbsp
			<a tabindex="2" href="Help.htm" target="_search" title="Afficher l'aide en ligne"><b>Aide</b></a>&amp;nbsp&amp;nbsp
	<tr style="color:#996666; height:12%;" cellpadding="0" cellspacing="0">
		<td valign="bottom"></td>
	<tr style="line-height:0pt;">
			<table width="250" border="0" cellspacing="0" cellpadding="0">
				<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%">&amp;nbsp</td>
		<td colspan="2" class="clsOperationTitleTD" style="vertical-align:middle;"> Les administrateurs
peuvent ajouter ou modifier :</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">&amp;nbsp <li><u><b>Informations sur les enseignants</b></u></li></span></td>
		<td width="40%">&amp;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">&amp;nbsp <li></li><u><b>Informations
sur les classes</b></u></span></td>
	<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">&amp;nbsp <li></li><u><b>Informations
sur les élèves</b></u></span></td>
	<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">&amp;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;

the "&nbsp" are transformed in "&amp;nbsp" and it's not working better...

I wonder what I should but in ProxyHTMLURLMap (BTW i've followed the directives
found here :

I've also noted that enabling "ProxyHTMLExtended On" makes the authentification
on the application impossible with this error (sorry in french...) :

"Votre navigateur Internet n'est pas configuré actuellement pour l'exécution des scripts
sur les pages Web.
Dans Internet Explorer, vous devez modifier ce paramètre via l'onglet Sécurité de la boîte
de dialogue
Options Internet pour continuer à utiliser l'Administrateur Class Server. Pour plus d'informations,
consultez l'aide en ligne de Internet Explorer. "

It's telling me that my browser is not correctly configured for javascript,
disabling "ProxyHTMLExtended" let me get rid of this error.

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