[ejabberd] apache proxy web_admin

Jesse Thompson jesse.thompson at doit.wisc.edu
Thu Sep 13 22:58:57 MSD 2007


I see what you are saying...  I guess that will suffice.

Here's what seems to work.  The first .* in the RewriteRule is required 
for me because I have a "ProxyPass / ..." defined later in this VirtualHost.

     <Location /admin>
         RewriteEngine On
         RewriteRule ^.*/admin/(.*)    /chat-admin/$1    [R,L]
     </Location>

     ProxyPass /chat-admin/ http://<ip>:5280/admin/
     ProxyPassReverse /chat-admin/ http://<ip>:5280/admin/


I still might consider changing the path of the web_admin itself.  Would 
this modification of the source code be enough to do it?

     sed 's/"\/admin/"\/chat-admin/g' ejabberd_web_admin.erl
     sed 's/"admin"/"chat-admin"/g' ejabberd_web.erl

Jesse

Alexandre LISSY wrote:
> I Think that a simple
> 
> RewriteURL ^/admin(.*) /chat-admin$1 [L,P] might do the trick, without the 
> need of changing links directly with some mod_proxy_html.
> 
> Le jeudi 13 septembre 2007, Jesse Thompson a écrit :
>> Hmm, that didn't seem to do anything.  Will that actually change the
>> links generated by the web_admin?
>>
>> I think I might need to use mod_proxy_html to do this.
>>
>> Jesse
>>
>> Eric Cestari wrote:
>>> Jesse,
>>>
>>> If you want to get rid of the /admin part, mod_rewrite can indeed do
>>> the trick.
>>>
>>> RewriteEngine On
>>> RewriteRule ^/(.*)$ /admin/$1 [P]
>>>
>>> Regards,
>>> 	Eric
>>>
>>> Le 13 sept. 07 à 16:39, Jesse Thompson a écrit :
>>>> I'm setting up the web_admin behind mod_proxy on apache.  This
>>>> works just fine, but I don't want it rooted at /admin
>>>>
>>>>     ProxyPass /admin/ http://<ip>:5280/admin/
>>>>     ProxyPassReverse /admin/ http://<ip>:5280/admin/
>>>>
>>>>
>>>> This works, but the URLs are all defined at the /admin root, not
>>>> relative.
>>>>
>>>>     ProxyPass /chat-admin/ http://<ip>:5280/admin/
>>>>     ProxyPassReverse /chat-admin/ http://<ip>:5280/admin/
>>>>
>>>>
>>>> Is there a way to fix this using apache (mod_rewrite perhaps) or by
>>>> changing something in the ejabberd configuration?
>>>>
>>>> Thanks,
>>>> Jesse
>>>> _______________________________________________
>>>> ejabberd mailing list
>>>> ejabberd at jabber.ru
>>>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>> _______________________________________________
>>> ejabberd mailing list
>>> ejabberd at jabber.ru
>>> http://lists.jabber.ru/mailman/listinfo/ejabberd
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3340 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.jabber.ru/pipermail/ejabberd/attachments/20070913/b399a72d/attachment.bin 


More information about the ejabberd mailing list