graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.92k stars 1.26k forks source link

[Q] AH01797, access_compat:error cannot find root cause #2836

Closed itinneed2022 closed 3 months ago

itinneed2022 commented 6 months ago

No matter where I set my "Require all granted" block in my httpd conf, I keep running into these errors:

[Thu May 30 10:55:16.510272 2024] [access_compat:error] [pid 1076428] [client 10.192.157.118:62319] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.company.com/static/js/ext/resources/css/ext-all.css
[Thu May 30 10:55:16.511078 2024] [access_compat:error] [pid 1076428] [client 10.192.157.118:62319] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.company.com/static/js/ext/resources/css/ext-all.css
[Thu May 30 10:55:16.511257 2024] [access_compat:error] [pid 1076425] [client 10.192.157.118:62322] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.company.com/static/js/ext/resources/css/ext-all.css
[Thu May 30 10:55:16.511815 2024] [access_compat:error] [pid 1076424] [client 10.192.157.118:62317] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.company.com/static/js/ext/resources/css/ext-all.css
[Thu May 30 10:55:16.513309 2024] [access_compat:error] [pid 1076425] [client 10.192.157.118:62322] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.company.com/static/js/ext/resources/css/ext-all.css
[Thu May 30 10:55:16.514069 2024] [access_compat:error] [pid 1076424] [client 10.192.157.118:62317] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.company.com/static/js/ext/resources/css/ext-all.css
[Thu May 30 10:55:17.583141 2024] [access_compat:error] [pid 1076424] [client 10.192.157.118:62317] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.company.com/composer?showTarget=infra.vmware.vm.aadprddb02.company.com.cpu_usage_average&showTarget=infra.vmware.vm.aadprddb02.company.com.cpu_usage_average&width=586&height=308&target=infra.vmware.vm.aadprddb02.company.com.cpu_usage_average
[Thu May 30 10:55:17.583900 2024] [access_compat:error] [pid 1076424] [client 10.192.157.118:62317] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.company.com/composer?showTarget=infra.vmware.vm.aadprddb02.company.com.cpu_usage_average&showTarget=infra.vmware.vm.aadprddb02.company.com.cpu_usage_average&width=586&height=308&target=infra.vmware.vm.aadprddb02.company.com.cpu_usage_average

Here's my config:

<VirtualHost *:443>
  ServerName graphite.company.com

  ## Vhost docroot
  DocumentRoot "/app/graphite/webapp"

  ## Directories, there should at least be a declaration for /app/graphite/webapp

  <Directory "/app/graphite/webapp">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride ALL
    Require all granted
  </Directory>

  ## Logging
  ErrorLog "/var/log/httpd/httpd_error_log"
  ServerSignature Off
  CustomLog "/var/log/httpd/httpd_access_log" "mainserver"

  ## Server aliases
  ServerAlias ssl-graphite-web
  ServerAlias graphite.company.com

  ## SetEnv/SetEnvIf for environment variables
  SetEnv HTTPS On

  ## SSL directives
  SSLEngine on
  SSLCertificateFile      "/etc/ssl/certs/comapny.crt"
  SSLCertificateKeyFile   "/etc/ssl/certs/company.key"
  SSLCertificateChainFile "/etc/ssl/certs/compant.csr"
  SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
  SSLCipherSuite          ECDH+AESGCM:ECDH+CHACHA20:ECDH+AES256:ECDH+AES128:!aNULL:!SHA1

  ## Custom fragment
  Alias /media/ "/app/graphite/lib/python3.9/site-packages/django/contrib/admin/media/"

ErrorLog /app/graphite/storage/log/webapp/error.log
CustomLog /app/graphite/storage/log/webapp/access.log common

#WSGIScriptAlias / /app/graphite/conf/graphite.wsgi
#WSGIImportScript /app/graphite/conf/graphite.wsgi process-group=%{GLOBAL} application-group=%{GLOBAL}

<Directory "/app/graphite/conf/">
  Require all granted
</Directory>
WSGIScriptAlias / /app/graphite/conf/graphite.wsgi
WSGIImportScript /app/graphite/conf/graphite.wsgi process-group=%{GLOBAL} application-group=%{GLOBAL}
<Directory /app/graphite/static/>
  Require all granted
</Directory>
<Location "/content/">
  Require all granted
</Location>
<Location "/media/">
  Require all granted
</Location>
<Location "/">
  Require all granted
</Location>

</VirtualHost>

I don't see what I'm missing here.

deniszh commented 3 months ago

I can only point you to relevant SO answer - https://stackoverflow.com/a/19588786 Please check all your default apache configuration for these directives and fix. Closing as not related to Graphite itself.