CGI execution apache2

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

CGI execution apache2

Post by twomonkeysayoyo »

I think my vhost is all bunged up and I'm not executing the cgi scripts in the zoneminder/cgi-bin directory. Can someone point me in the right direction on this? I've checked permissions, and I've created little test cgi-scripts. The apache2/access_log tells me

Code: Select all

"GET /cgi-bin/first.pl HTTP/1.1" 404 276
and the directory looks like this:

Code: Select all

camerahost www # ls -al zoneminder/cgi-bin
total 980
drwxr-xr-x 2 apache apache   4096 May 29 18:30 .
drwxr-xr-x 6 root   root     4096 May 29 17:58 ..
-rwxr-xr-x 1 root   root       76 M[code]ay 29 18:30 first.pl
-rwxr-xr-x 2 root   root   490916
May 27 18:21 nph-zms
-rwxr-xr-x 2 root root 490916 May 27 18:21 zms
[/code]

my vhost looks like this, but I have been messing with it a bit:

Code: Select all

ScriptAlias /cgi-bin/zms "/var/www/zoneminder/cgi-bin/zms"
ScriptAlias /cgi-bin/nph-zms "/var/www/zoneminder/cgi-bin/nph-zms"
ScriptAlias /cgi-bin/testcgi "/var/www/zoneminder/cgi-bin/testcgi"
Alias /zoneminder "/var/www/zoneminder/htdocs"

<FilesMatch> "\.(cgi|shtml|phtml|php)$"> #the stray '>' after FilesMatch is there only because this forum won't show it correctly without
</FilesMatch>


<Directory>
  AllowOverride All
  AddHandler cgi-script .cgi
  Options +ExecCGI
  Order allow,deny
  Allow from all
</Directory>


<Directory>
  Options -Indexes MultiViews FollowSymLinks
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>
twomonkeysayoyo
Posts: 12
Joined: Thu May 20, 2010 11:50 pm

Post by twomonkeysayoyo »

ok, after removing the # from the scriptalias it does indeed seem to work. I had tested this earlier, but found that the ExecCGI was missing the '+' so when I tested that it didn't work because for whatever reason cgi-bin/nph-zms acts differently than cgi-bin/zms. I still can't get images to show in the web viewer, though it does appear that the cgi-script zms is being executed, I can't say for the nph-zms.
twomonkeysayoyo
Posts: 12
Joined: Thu May 20, 2010 11:50 pm

Post by twomonkeysayoyo »

I can find no mention of nph-zms in any of the logs. when I switch to zms I get

Code: Select all

ERR-zms.cpp/221 [Unable to authenticate user]
twomonkeysayoyo
Posts: 12
Joined: Thu May 20, 2010 11:50 pm

Post by twomonkeysayoyo »

logged out and logged back in, have images! Hooray. However I can't get but one monitor to show me images at a time.
Locked