Ubuntu Server 16.04 fresh install issues

Forum for questions and support relating to the 1.29.x releases only.
Locked
ghulands
Posts: 3
Joined: Sun Oct 30, 2016 3:38 am

Ubuntu Server 16.04 fresh install issues

Post by ghulands »

Hi,
I have just installed a fresh ubuntu server 16.04 LTS and followed the directions in the wiki. I have added my cameras and see they have connected, but when I try to view them, I get 404's on the requests for the images.

The installed version is: 1.29.0+dfsg-1ubuntu2

The url is writes out is this
http://zm:8080/cgi-bin/nph-zms?mode=jpe ... and=392918

but it should be this:
http://zm:8080/zm/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=30&buffer=1000&monitor=2&connkey=80314&rand=392918

I tracked the issue being that this patch must not have been applied when the package was built.

https://github.com/ZoneMinder/ZoneMinde ... path.patch

I then went and edited the perl module directly at /usr/share/perl5/ZoneMinder/ConfigData.pm and then restarted the server. It seems to still no use the /zm/ in the url when it's generating the page. My guess is that the perl module is cached somewhere but i'm not sure where.

Does anyone have any ideas? Any help is greatly appreciated.
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Ubuntu Server 16.04 fresh install issues

Post by SteveGilvarry »

The patch is in later packages, use iconnor zoneminder stable PPA to get 1.30 which is the other wiki instructions for 16.04, on fresh install that will patch, or Change PATH_ZMS to /zm/cgi-bin/nph-zms in Config->Paths under Gui top RHS. The patch only works on fresh installs first run, editing configdata.pm doesn't need to be done and is too late now, as database is populated.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
ghulands
Posts: 3
Joined: Sun Oct 30, 2016 3:38 am

Re: Ubuntu Server 16.04 fresh install issues

Post by ghulands »

I just installed 1.30 and see the same problem. I tried to fix it via a rewrite rule in apache, but can't seem to quite get it right.

Code: Select all

RewriteEngine On
RewriteCond "%{REQUEST_URI}" "^/cgi-bin/nph-zms"
RewriteRule "^/cgi-bin/nph-zms" "/zm/cgi-bin/nph-zms?%{QUERY_STRING}"

Code: Select all

[rewrite:trace2] init rewrite engine with requested uri /cgi-bin/nph-zms
[rewrite:trace3] applying pattern '^/cgi-bin/nph-zms' to uri '/cgi-bin/nph-zms'
[rewrite:trace2] rewrite '/cgi-bin/nph-zms' -> '/zm/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=30&buffer=1000&monitor=2&connkey=80314&rand=392918'
[rewrite:trace3] split uri=/zm/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=30&buffer=1000&monitor=2&connkey=80314&rand=392918 -> uri=/zm/cgi-bin/nph-zms, args=mode=jpeg&scale=100&maxfps=30&buffer=1000&monitor=2&connkey=80314&rand=392918
[rewrite:trace2] local path result: /zm/cgi-bin/nph-zms
[rewrite:trace2] prefixed with document_root to /var/www/html/zm/cgi-bin/nph-zms
[rewrite:trace1] go-ahead with /var/www/html/zm/cgi-bin/nph-zms [OK]
This still gives me a 404. :-(
ghulands
Posts: 3
Joined: Sun Oct 30, 2016 3:38 am

Re: Ubuntu Server 16.04 fresh install issues

Post by ghulands »

I had the above post sitting waiting to submit and never saw your reply. Your fix worked. Thanks for your help.
Locked