I have a CentOS box running a number of web applications and I use Apache to proxy requests to the various applications. All of them are working except an Erlang Nitrogen application which I can't seem to get working.
I am running the Nitrogen app in the standard way and it can be accessed locally on the machine at http://localhost:8000. I have verified this using wget.
Here is the apache configuration file I am trying to use:
ProxyRequests Off
ProxyPreserveHost On
<Proxy http://my-ip:8000/*>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /erlang http://my-ip:8000/
ProxyPassReverse /erlang http://my-ip:8000/
ProxyPassReverse /erlang http://my-ip/
This setup is similar to all the other successfully working proxies on the system except that the other applications are not deployed to the root of their server like Nitrogen seems to be doing.
The result is that the basic page is downloading correctly into the web browser but all of the accompanying resources are not. This gives me an un-styled page where the javascript does not function correctly.
Here is the log from Apache:
x.x.x.x - - [timestamp] "GET /erlang HTTP/1.1" 200 2884
x.x.x.x - - [timestamp] "GET /nitrogen/jquery.js HTTP/1.1" 404 484
x.x.x.x - - [timestamp] "GET /nitrogen/jquery-ui.js HTTP/1.1" 404 484
x.x.x.x - - [timestamp] "GET /nitrogen/livevalidation.js HTTP/1.1" 404 484
x.x.x.x - - [timestamp] "GET /nitrogen/nitrogen.js HTTP/1.1" 404 484
x.x.x.x - - [timestamp] "GET /nitrogen/bert.js HTTP/1.1" 404 484
x.x.x.x - - [timestamp] "GET /nitrogen/jquery-ui/jquery.ui.all.css HTTP/1.1" 404 484
x.x.x.x - - [timestamp] "GET /nitrogen/nitrogen.css HTTP/1.1" 404 484
x.x.x.x - - [timestamp] "GET /css/style.css HTTP/1.1" 404 484
I have a hard requirement to use Apache as my proxy - I am not going to reset up all the other applications just to get this Nitrogen application working. Opening port 8000 in the firewall is also out of the question.
I am open to using any Apache module (mod-rewrite, etc) or any Apache setting as long as it doesn't affect the rest of the applications. I can also change any settings in the Nitrogen application to get it to play nicer with Apache.
How can I use Apache to proxy/reverse proxy for my Nitrogen application?