Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running some webcams (with embedded servers) on my business network that are accessible via the web, and I want to make "pretty" URLs that Apache can route to the ports that they run on so my wife doesn't need to memorize the port numbers.

For example, one of the cameras is local IP, and the webcam server (I'm using IP Webcam on an Android phone) is running on port 7890. I port forwarded my router and I can access it via the web at What I want to do is give it a nice URL like and have Apache route to the correct LAN IP/port. This also works fine with the following in my httpd.conf:

ProxyPass /cams/1
ProxyPassReverse /cams/1

I can type into the browser and get the html page that it serves.

The problem is, the page it initially serves is just a bunch of links, i.e., the following:

enter image description here

where each link is relative to the root of the page. For example, I usually use the 3rd link, "Use java browser plugin". The URL for this link is /java.html. If I use the "absolute" URL,, it works as expected. But with the Proxying enabled, the link produced is, and I have no java.html in my root folder (even if I did, it would be a different file than the webcam's).

So my question is, how to I continue to have these pretty URLs, but then have the URLs internal to the served page (or any arbitrary sub-URLs) still respect the /cams/1 offset so that it will all work right?

share|improve this question

closed as off topic by Shane Madden, EEAA, Ward, Iain Aug 28 '12 at 6:54

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

The HTML for the page you're looking at is generated by the webcam server, not by Apache. That's where you need to fix the configuration.

share|improve this answer
You could also use a more sophisticated proxy that can rewrite the HTML that's passing through it, but this would be substantial overkill for what you're trying to do -- If you can't modify the HTML generated by the camera you're pretty much out of luck... – voretaq7 Aug 28 '12 at 17:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.