404 after upgrade

Forum for questions and support relating to the 1.30.x releases only.
Locked
SteveTPearce
Posts: 4
Joined: Fri Aug 12, 2016 11:35 am

404 after upgrade

Post by SteveTPearce »

I've been using ZoneMinder for a long time but seem to have trouble every time I upgrade - my recent move to 1.30 (from 1.26.5) is no exception!

I'm currently running on an Ubuntu 14.04 server, and followed the instructions at https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way to install.

All progressed well until I tried to reload the Apache config - this was due to a dangling link to the old zoneminder.conf file in the conf.d directory - easily fixed.

However, in spite of having a2enconf zoneminder and repeatedly reloaded and restarted Apache, I just get a 404 every time I try to access /zm by IP address, DNS name or localhost from the server itself - either by http or https. I've checked that /etc/apache/conf-enabled contains the softlink to ../conf-available/zoneminder.conf, and that the files referred to there exist where they should do. Other web pages (e.g. phpMyAdmin, Owncloud...) seem to be working fine.

Given that I'm getting a 404 rather than any other misconfiguration warning I'd've thought it'd be something simple but I've been going around in circles for hours and can't see anything wrong. There's nothing in the Apache logs and the apt-get install process completed without error.

Any advice on where to go from here would be most welcome...
mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm

Re: 404 after upgrade

Post by mattionline »

Open your zoneminder.conf in conf-enabled and check if the alias path is set correctly.
I can only imagine that the alias zm is set to an non existing/empty www directory of zm.
My Personal Blog: https://mattionline.de
SteveTPearce
Posts: 4
Joined: Fri Aug 12, 2016 11:35 am

Re: 404 after upgrade

Post by SteveTPearce »

Thanks for the suggestion - but the alias looks correct to me.

What I have just tried out of desperation is to create a symlink in /var/www directly to /usr/share/zoneminder/www (as specified in zoneminder.conf). That appeared to work just fine but goes nowhere to explain (to me at least) why the conf file didn't work. How reliable a workaround this proves to be remains to be seen...

I've been wondering whether there's something left over from a previous hack somewhere in my Apache configuration but a grep through all the likely files has failed to turn anything up.

Any more suggestions, anyone..?
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: 404 after upgrade

Post by bbunge »

Follow the upgrade instructions and not the install instructions.
SteveTPearce
Posts: 4
Joined: Fri Aug 12, 2016 11:35 am

Re: 404 after upgrade

Post by SteveTPearce »

Thanks for that. I've just been the upgrade instructions and the only additional step seems to be a dist-upgrade rather than an install.
Unfortunately, an new kernel and a reboot later, the config file still doesn't work but the symlink hack appears to.
This makes me think the issue lies with my Apache configuration. Should be something simple but I'm unable to find it. Any gurus out there got an idea? I've checked through the config and can't see any reference to zm other than the zoneminder.conf file...
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: 404 after upgrade

Post by knight-of-ni »

Yes, this absolutely is an Apache configuration problem.
None of us can see what your apache configuration looks like so we can't tell you exactly what to fix. You need to look at your configuration again, because that is definitely where the problem lies. Your apache log files will probably have some clues.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
SteveTPearce
Posts: 4
Joined: Fri Aug 12, 2016 11:35 am

Re: 404 after upgrade

Post by SteveTPearce »

Understood - thanks anyway.

Nothing in the logs so I'll just have to keep trawling...
Locked