TurnKey Linux Virtual Appliance Library

Reverse-Proxying the eJabberd Appliance

Recently discovered you, great work!

I've configured your LAMP Appliance as a frontend to my web apps, one of which is hopefully your XMPP Chat Appliance. I have both Turnkey appliances up and running and they work fine.

Problem is that I can't get LAMP to reverse-proxy XMPP's SpeeqeWeb correctly. I have configured and tested reverse proxy with another app, but when I try to do the exact same thing for the XMPP Chat Appliance through mydomain.com/xmpp the /xmpp gets stripped off somewhere in the XMPP Appliance and I only get the index.html page and it can't load js and css.

My config:

ProxyPass /xmpp http://192.168.1.113/
ProxyPassReverse /xmpp http://192.168.1.113/

I have also tried using mod_http to rewrite urls as such with no change:

ProxyHTMLURLMap http://localhost /xmpp

If I go directly to 192.168.1.113 I get everything fine. As I mentioned it seems I have Apache configured correctly for this as I can proxy another quite complicated app at another internal address perfectly.

This is a showstopper for me, I'm sure someone has done this and any help would be greatly appreciated.
Liraz Siri's picture

Try to understand the problem before you try to fix it

I haven't tried exactly what you're doing before but that doesn't really matter as more often then not the first thing I try doesn't work and the challenge is to figure out:

1) what exactly is going on? 2) how to fix it...

In that order. You can't fix something before you know how it's broken and it doesn't sound like you have a good fix on that yet. Don't just try random stuff, you'll just be flailing in the dark. Get to the bottom of it.

In your shoes I would try to use FireBug or Google built-in developer tools to figure out what resources are not being loaded and why. My guess is that you haven't configured the URL rewriting properly but it could be far more complicated. You can rewrite static HTML pretty easily, but Javascript can assemble URLs pointing to the "wrong" address on the fly in which case you'll have to configure your application to think its running on the proxy.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)