Apache config problems, please help

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
hansie
Posts: 15
Joined: Wed May 19, 2004 3:40 pm

Apache config problems, please help

Post by hansie »

Hi,

I have a rather exotic setup, and now I can't get Apache to play nice.
Have seen posts here describing more or less what I want, but in my specific situation I can't make it work.
Sorry for the long posting....

Here we go:

I have two Centos 6.4 machines (earth and vulcan) in a high-available cluster. High availability is necessary for some office collaboration software I have running that needs to be up all the time.
Earth is the primary machine, which has Apache running and is servicing from /var/www/html. This filesystem is mounted by the HA software, and, in case of a failover, will mount over the same location on Vulcan.
Vulcan is the standby machine and the one where the capturecard is installed. Because of the fact that /var/www/html will be overmounted in case of a problem with Earth, I compiled ZM to make use of webdir /usr/local/share/zm and webcgi /usr/local/share/zm/cgi-bin.
By the way, I'm using ZM 1.26.3.
Also on Vulcan, a dedicated Apache server is running for ZM, simply on localhost port 80.

So, recapping :

Earth:
CentOS 6.4, Apache, MySQL, Zarafa (collaboration software), HA-software
primary

Vulcan:
Centos 6.4, Apache for ZM, HA-software.
secondary

Now, the high available Apache instance is the one that services requests from the internet for my domain hanlammerts.mine.nu .
This instance should forward any requests for zm to Vulcan where the dedicated Apache instance for ZM picks up the requests.
Normally this can be done with mod_proxy, and it works, ALMOST.....

Before I go any further: ZoneMinder is working perfectly if I go directly to Vulcan /zm !!
So ZM is working.

This is the config I have on earth for Apache :

Code: Select all

ProxyRequests Off
ProxyVia On
ProxyPreserveHost On

<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>

ProxyPass /zm/ http://192.168.0.15/zm/
ProxyPassReverse /zm/ http://192.168.0.15/zm/
ProxyPass /cgi-bin/ http://192.168.0.15/cgi-bin/
ProxyPassReverse /cgi-bin/ http://192.168.0.15/cgi-bin/
This is the config for Apache I have on Vulcan :

Code: Select all

Alias /zm "/usr/local/share/zm"

<Directory "/usr/local/share/zm">
    Options FollowSymLinks
    AllowOverride All
    # The code unfortunately uses short tags in many places
    php_value short_open_tag 1
</Directory>

ScriptAlias /cgi-bin "/usr/local/share/zm/cgi-bin"

<Directory "/usr/local/share/zm/cgi-bin">
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AllowOverride All
    # The code unfortunately uses short tags in many places
</Directory>
What happens is the following:

If I go to hanslammerts.mine.nu/zm/, I do get the ZM page, and I can configure things.
I can't get any live stream or stills, though. In IE I get a placeholder, and if I look at the properties of that thing, it says

Code: Select all

http://hanslammerts.mine.nu/cgi-bin/nph-zms?mode=single&monitor=4&scale=100&rand=1380742430&1380744057318
I'm thinking this is wrong, because there is no .../cgi-bin/nph-zms on this server (hanslammerts.mine.nu = earth).
But I thought I told the primary Apache instance to proxy /cgi-bin ?

There must be something wrong in my configuration, but I don't see it.

Anyone out there that has done this trick before ?
I know my setup is tricky, and if I would make Vulcan the primary machine it would all be a lot easier, but Vulcan is the slower one....

Any suggestions are more than welcome.

Thank you,
Hans
Post Reply