Gentoo, 'forbidden' web page

Forum for questions and support relating to the 1.24.x releases only.
Locked
twomonkeysayoyo
Posts: 12
Joined: Thu May 20, 2010 11:50 pm

Gentoo, 'forbidden' web page

Post by twomonkeysayoyo »

Hi, trying to install zoneminder on a fresh gentoo box. Follwed http://www.zoneminder.com/wiki/index.ph ... o_ZioPRoTo (as best possible, had to extrapolate a few steps).

Anyway, ran into some permission issues when trying to start up Zoneminder, and have an inability to get to the Zoneminder site on my box.

When starting with the regular startup script I get:

Code: Select all

Can't connect: Permission denied at /usr/lib/perl5/site_perl/5.8.8/ZoneMinder/Debug.pm line 349
        ZoneMinder::Debug::Fatal('Can\'t connect: Permission denied') called at /usr/bin/zmdc.pl line 168  
When starting up with the startup script from wiki page above I get the same thing.

/var/log/messages gives me

Code: Select all

May 27 19:36:39 camerahost zmpkg[7305]: INF [Command: start]
May 27 19:36:39 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/bin/true
May 27 19:36:39 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:36:39 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:36:39 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmdc.pl check
May 27 19:36:39 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:36:39 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:36:39 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmfix
May 27 19:36:39 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:36:39 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:36:39 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmdc.pl startup
May 27 19:36:39 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:36:39 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:36:40 camerahost zmdc[7319]: INF [Server starting at 10/05/27 19:36:40]
May 27 19:36:42 camerahost zmdc[7319]: FAT [Can't bind: Address already in use]
May 27 19:36:50 camerahost zmdc[7317]: FAT [Can't connect: Permission denied]
May 27 19:36:50 camerahost zmpkg[7305]: ERR [Unable to run "sudo -u apache /usr/bin/zmdc.pl startup", output is "Starting server"]
May 27 19:36:50 camerahost rc-scripts: Failed to start ZoneMinder
Help?
twomonkeysayoyo
Posts: 12
Joined: Thu May 20, 2010 11:50 pm

Post by twomonkeysayoyo »

ok, actually I fixed the error message, but still get
Forbidden

You don't have permission to access /zoneminder/ on this server.
when I go to http://MYIP/zoneminder

http://MYIP/ gives me the page that it is supposed to.

I had to change /var/run/zm permissions to apache.apache now zoneminder starts, but I still don't get the webpage.

Code: Select all

May 27 19:52:14 camerahost zmpkg[773]: INF [Command: start]
May 27 19:52:14 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/bin/true
May 27 19:52:14 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:52:14 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:52:14 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmdc.pl check
May 27 19:52:14 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:52:14 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:52:14 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmfix
May 27 19:52:14 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:52:14 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:52:14 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmdc.pl startup
May 27 19:52:14 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:52:14 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:52:14 camerahost zmdc[788]: INF [Server starting at 10/05/27 19:52:14]
May 27 19:52:17 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmfilter.pl
May 27 19:52:17 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:52:17 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:52:17 camerahost zmdc[788]: INF ['zmfilter.pl' starting at 10/05/27 19:52:17, pid = 813]
May 27 19:52:17 camerahost zmdc[813]: INF ['zmfilter.pl' started at 10/05/27 19:52:17]
May 27 19:52:17 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmaudit.pl -c
May 27 19:52:17 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:52:17 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:52:17 camerahost zmdc[788]: INF ['zmaudit.pl -c' starting at 10/05/27 19:52:17, pid = 817]
May 27 19:52:17 camerahost zmdc[817]: INF ['zmaudit.pl -c' started at 10/05/27 19:52:17]
May 27 19:52:17 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmwatch.pl
May 27 19:52:17 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:52:17 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:52:17 camerahost zmdc[788]: INF ['zmwatch.pl' starting at 10/05/27 19:52:17, pid = 821]
May 27 19:52:17 camerahost zmdc[821]: INF ['zmwatch.pl' started at 10/05/27 19:52:17]
May 27 19:52:17 camerahost sudo:     root : TTY=pts/0 ; PWD=/var/www/zoneminder/htdocs ; USER=apache ; COMMAND=/usr/bin/zmdc.pl start zmupdate.pl -c
May 27 19:52:17 camerahost sudo: pam_unix(sudo:session): session opened for user apache by root(uid=0)
May 27 19:52:17 camerahost sudo: pam_unix(sudo:session): session closed for user apache
May 27 19:52:17 camerahost zmfilter[813]: INF [Scanning for events]
May 27 19:52:17 camerahost zmwatch[821]: INF [Watchdog starting]
May 27 19:52:17 camerahost zmwatch[821]: INF [Watchdog pausing for 30 seconds]
May 27 19:52:17 camerahost zmdc[788]: INF ['zmupdate.pl -c' starting at 10/05/27 19:52:17, pid = 827]
May 27 19:52:17 camerahost zmdc[827]: INF ['zmupdate.pl -c' started at 10/05/27 19:52:17]
twomonkeysayoyo
Posts: 12
Joined: Thu May 20, 2010 11:50 pm

Post by twomonkeysayoyo »

looks like I might not be running php on the server. Does apache2 require mod_php or anything?
twomonkeysayoyo
Posts: 12
Joined: Thu May 20, 2010 11:50 pm

Post by twomonkeysayoyo »

ok, so, yes, I was running PHP on the server. however the installed vhost for Gentoo was crap. I don't know if anything else is wrong with it yet, but I had to add

Code: Select all

 <FilesMatch ".(cgi|shtml|phtml|php)$"<></FilesMatch>  (subtract the odd '<' in the first part... don't know why this thing isn't formatting it correctly)
above the <Directory> in the

Code: Select all

/etc/apache2/vhosts.d/10_zoneminder.conf
and now I have what appears to be a console.
Oo.et.oO
Posts: 8
Joined: Tue Nov 03, 2009 2:39 am

Post by Oo.et.oO »

the code above just plain would not work for me trying to restart apache.

i had to separate the FilesMatch tag onto two lines:

Code: Select all

<FilesMatch>
</FilesMatch>
i can't get the above to format and include the file extension regex either...

anyway, i still get the permissions issue.

i also have two "Directory" tags in zoneminder vhosts

ideas?
zm 1.24.2 on gentoo amd64
Locked