# apache2 and cgi authz_core:error

## manywele

I'm trying to get zoneminder set up. It's all working except the last piece, getting the cgi scripts the right permissions to run. I have tested php and know it's working. I can get to zoneminder's configuration page. It's just the cgi scripts that display images. The directories and executables are all 775. I can get the camera image directly through vlc and mplayer. What am I missing?

/etc/conf.d/apache

```
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -D PROXY"

```

Apache2 error

```
[authz_core:error] [pid 12884] [client ::1:49124] AH01630: client denied by server configuration: /var/www/localhost/cgi-bin, referer: http://localhost/zm/index.php?view=watch&mid=3
```

/etc/apache2/vhosts.d/10_zoneminder.conf

```
ScriptAlias /cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms"

ScriptAlias /cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms"

<Directory "/usr/libexec/zoneminder/cgi-bin">

  Options +ExecCGI +SymLinksIfOwnerMatch

  AllowOverride All

  Require all granted

</Directory>

Alias /zm "/usr/share/zoneminder/www"

<Directory "/usr/share/zoneminder/www">

  Options -Indexes +MultiViews +FollowSymLinks

  AllowOverride All

  Require all granted

</Directory>

```

----------

## kikko

Hi manywele

denial error is for "/var/www/localhost/cgi-bin", while in your config "/zm" is mapped to "/usr/share/zoneminder/www"

there must be something else in your apache config, maybe outside the vhosts directives

Let me know

Regards

----------

## manywele

Thank you kikko. I was just looking at the cgi-bin and hadn't noticed the wrong pathway. I had to change the cgi-bin settings in vhosts.d/default_vhost.include. Now it finally works. That software was a pain to set up.

----------

