logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: mod_proxy fails with .SHTML
Author
JeremyGelber



Joined: 08 Sep 2015
Posts: 9
Location: London, UK

PostPosted: Wed 17 Feb '16 10:41    Post subject: mod_proxy fails with .SHTML Reply with quote

I have got a couple of proxies to work just fine, those which return HTML pages.

However, I've got one server (an IP camera) that wants to return .SHTML rather than standard .HTML files and that fails. Do I need to make a declaration in the .conf file that .SHTML should be intepreted as regular HTML or is there something I'm missing? If so, how do I go about doing that?

Also, is a proxy the correct way to deal with avoiding opening ports for other applications? I was hoping to ONLY have port 80 open on the firewall and then get Apache to redirect any specific requests to a particular server AND port combination despite it potentially not being HTML. Presumably that won't work because mod_proxy only deals with HTML?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 17 Feb '16 11:05    Post subject: Reply with quote

Yyu may post your proxy config for that cam.
Back to top
JeremyGelber



Joined: 08 Sep 2015
Posts: 9
Location: London, UK

PostPosted: Thu 18 Feb '16 10:55    Post subject: Reply with quote

James Blond wrote:
Yyu may post your proxy config for that cam.


Code:

ProxyRequests Off 
ProxyHTMLEnable On   
ProxyPass /Cam1/ http://192.168.0.70/
<Location /Cam1-gateway/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   ProxyHTMLURLMap http://192.168.0.70/ /Cam1/
   ProxyHTMLURLMap / /Cam1/
</Location>


So what happens is I navigate to www.mydomain.com/Cam1/ and back comes this:

http://www.mydomain.com/view/viewer_index.shtml?id=634

which obviously doesn't work. If I then insert "Cam1" into the URL (http://www.Mydomain.com/Cam1/view/viewer_index.shtml?id=634) it works just fine. ** EDIT: no it doesn't. It tries to authorise but clearly is going back to the wrong URL internally so then just sits there **

I had thought the secton ProxyHTMLURLMap was wrong and it should go to Cam1 rather than root, but that didn't work.
Back to top
JeremyGelber



Joined: 08 Sep 2015
Posts: 9
Location: London, UK

PostPosted: Wed 24 Feb '16 11:48    Post subject: Reply with quote

Any ideas on this one please?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 26 Feb '16 10:59    Post subject: Reply with quote

The Location path is a different one than the ProyPass

There is Cam1 and Cam1-gateway. Those two must match.
Back to top
JeremyGelber



Joined: 08 Sep 2015
Posts: 9
Location: London, UK

PostPosted: Sat 27 Feb '16 14:32    Post subject: Reply with quote

James Blond wrote:
The Location path is a different one than the ProyPass

There is Cam1 and Cam1-gateway. Those two must match.


That made no difference - either one will redirect to http://www.mydomain.com/view/viewer_index.shtml?id=30

Am I doing something wrong with the ProxyPassReverse statement? Should it definitely be just "/" ?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 08 Mar '16 17:49    Post subject: Reply with quote

There is a tutorial for that from the maker of mod_proxy_html

please see http://www.apachetutor.org/admin/reverseproxies ( do not end until The Complete Configuration )


if you still have a question or an issue please ask again.
Back to top
JeremyGelber



Joined: 08 Sep 2015
Posts: 9
Location: London, UK

PostPosted: Mon 28 Mar '16 7:08    Post subject: Reply with quote

I'm still having all sorts of difficulties with running a reverse proxy.

Does it matter WHAT the content is? Essentially I'm trying to have only port 80 open externally, and for a bunch of internal servers that offer up HTML but also other things, have Apache allow access to them whatever their port number is. So for example, one system runs on port 8000 and I am trying to serve it via the reverse proxy, re-mapping from port 8000 to port 80 by using internal.domain.com:8000 as the redirect URL.

I've had extremely limited success so far with any of this and it's really annoying me!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 29 Mar '16 11:47    Post subject: Reply with quote

You may post your config at http://apaste.info/ or http://pastebin.com/

Also consulting your access and error log of these vhosts may help. IN doubt apache log can be set to debug mode.
Back to top


Reply to topic   Topic: mod_proxy fails with .SHTML View previous topic :: View next topic
Post new topic   Forum Index -> Apache