You are not logged in.

#1 2017-05-04 14:10:31

TremorAcePV
Member
Registered: 2016-08-24
Posts: 22

[Apache] "client denied by server configuration" - Unsure on config

This is after following the Arch Wiki to install Apache and PHP along with Cacti.

[Thu May 04 13:26:35.512226 2017] [authz_core:error] [pid 505] [client 10.0.12.97:51820] AH01630: client denied by server configuration: /usr/share/webapps/cacti/

This error lead me to finding this StackOverflow page: http://stackoverflow.com/questions/1839 … figuration

[root@httpd ~]# cat /etc/httpd/conf/httpd.conf | grep -n -A 3 -B 3 Require
235-#
236-<Directory />
237-    AllowOverride none
238:    Require all denied
239-</Directory>
240-
241-#
--
276-<Directory "/srv/http">
277-    Options Indexes FollowSymLinks
278-    AllowOverride None
279:    Require all granted
280-</Directory>
281-
282-#
--
292-# viewed by Web clients. 
293-#
294-<Files ".ht*">
295:    Require all denied
296-</Files>
297-
298-#
--
386-<Directory "/srv/http/cgi-bin">
387-    AllowOverride None
388-    Options None
389:    Require all granted
390-</Directory>
391-
392-<IfModule headers_module>
[root@httpd ~]# cat /etc/httpd/conf/extra/cacti.conf
Alias /cacti /usr/share/webapps/cacti
<Directory /usr/share/webapps/cacti>
  # PHP options
  AddType application/x-httpd-php .php
  <IfModule dir_module>
    DirectoryIndex index.php
  </IfModule>

  Require all granted
  Options +FollowSymLinks
  AllowOverride All

  # The following may be useful.
  #<IfModule mod_php5.c>
  #  php_flag magic_quotes_gpc Off
  #  php_flag short_open_tag On
  #  php_flag register_globals Off
  #  php_flag register_argc_argv On
  #  php_flag track_vars On
  #  # This setting is necessary for some locales.
  #  php_value mbstring.func_overload 0
  #  php_value include_path .
  #</IfModule>
</Directory>

^^^That was copied/pasted from the Arch Wiki page: https://wiki.archlinux.org/index.php/cacti#Cacti_Setup

[root@httpd ~]# cat /etc/httpd/conf/httpd.conf | grep -n -A 1 -B 1 cacti
545-
546:Include conf/extra/cacti.conf # Last Line of File.

So I know Cacti's config file should be loaded. Now, I found this page: https://wiki.apache.org/httpd/ClientDen … figuration

I'm not sure what my solution is, because the Cacti config file has "Require all granted". I thought maybe the issue was "Allow Override None" in the root Directory, and the Cacti config file has "Options +FollowSymLinks", but Overrides are done through access files AFAIK.

Offline

#2 2017-05-05 13:27:08

TremorAcePV
Member
Registered: 2016-08-24
Posts: 22

Re: [Apache] "client denied by server configuration" - Unsure on config

I didn't seem to actually post what the specific error was.

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

Error 403

10.0.1.9
Apache

There's definitely an index.php, and php is enabled as phpMyAdmin on the same machine works perfectly fine. Both /usr/share/webapps/phpMyAdmin and /usr/share/webapps/cacti have the same permissions.

As I've posted in the OP, the cacti config file for Apache has the Alias and "Require all granted" for that directory. I have a separate web service (nagios) setup and it's giving me access fine. Again, same permissions.

[root@httpd ~]# tail -2 /var/log/httpd/error_log 
[Fri May 05 13:13:12.105442 2017] [core:notice] [pid 3700] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'
[Fri May 05 13:13:18.355216 2017] [authz_core:error] [pid 3701] [client 10.0.1.7:57754] AH01630: client denied by server configuration: /usr/share/webapps/cacti/

I wouldn't know where else to look for information on what the issue is.

Offline

#3 2017-05-08 17:01:53

TremorAcePV
Member
Registered: 2016-08-24
Posts: 22

Re: [Apache] "client denied by server configuration" - Unsure on config

As it turns out, it was the default .htaccess file and it's contents of "Require all denied" within the cacti site directory.

Changing the contents to "Require all granted" followed by "Satisfy Any" fixed my issue.

Offline

Board footer

Powered by FluxBB