php - AH01797: Apache Web 服务器中的服务器配置 Wordpress 插件 JS 文件拒绝客户端
问题描述
我在尝试向 Wordpress 网站添加帖子时遇到问题。该站点使用 fastcgi 在示意图中工作,位于 email.medialab.ufg.br 之类的子域中。这些问题似乎与从 Wordpress 插件访问 .js 和 .css 文件有关。这是报告的错误:
[Fri Jun 08 13:45:44.000087 2018] [access_compat:error] [pid 32401] [client 200.137.195.149:63863] AH01797: client denied by server configuration: /home/l3p/apache_sites/email.medialab.ufg.br/web/wp-content/plugins/advanced-custom-fields-pro/assets/inc/timepicker/jquery-ui-timepicker-addon.min.js, referer: https://email.medialab.ufg.br/wp-admin/post-new.php?gutenberg-demo
该站点的 .htaccess 文件具有以下配置:**
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
并且virtualhost文件如下配置:
<VirtualHost *:80>
DocumentRoot /home/l3p/apache_sites/email.medialab.ufg.br/web
ServerName email.medialab.ufg.br
ServerAlias www.email.medialab.ufg.br
ServerAdmin webmaster@email.medialab.ufg.br
ErrorLog /var/log/ispconfig/httpd/email.medialab.ufg.br/error.log
Alias /error/ "/home/l3p/apache_sites/email.medialab.ufg.br/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html
<Directory /home/l3p/apache_sites/email.medialab.ufg.br/web>
# Clear PHP settings of this website
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler None
</FilesMatch>
Options +FollowSymLinks +Indexes +Multiviews
AllowOverride All
Require all granted
</Directory>
<Directory /home/l3p/apache_sites/clients/client1/web73/web>
# Clear PHP settings of this website
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler None
</FilesMatch>
Options +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# suexec enabled
<IfModule mod_suexec.c>
SuexecUserGroup web73 client1
</IfModule>
# php as fast-cgi enabled
# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
<IfModule mod_fcgid.c>
FcgidIdleTimeout 300
FcgidProcessLifeTime 3600
# FcgidMaxProcesses 1000
FcgidMaxRequestsPerProcess 5000
FcgidMinProcessesPerClass 0
FcgidMaxProcessesPerClass 10
FcgidConnectTimeout 3
FcgidIOTimeout 600
FcgidBusyTimeout 3600
FcgidMaxRequestLen 1073741824
</IfModule>
<Directory /home/l3p/apache_sites/email.medialab.ufg.br/web>
<FilesMatch "\.php[345]?$">
SetHandler fcgid-script
</FilesMatch>
FCGIWrapper /var/www/php-fcgi-scripts/web73/.php-fcgi-starter .php
FCGIWrapper /var/www/php-fcgi-scripts/web73/.php-fcgi-starter .php3
FCGIWrapper /var/www/php-fcgi-scripts/web73/.php-fcgi-starter .php4
FCGIWrapper /var/www/php-fcgi-scripts/web73/.php-fcgi-starter .php5
Options +ExecCGI
AllowOverride All
Require all granted
</Directory>
<Directory /home/l3p/apache_sites/clients/client1/web73/web>
<FilesMatch "\.php[345]?$">
SetHandler fcgid-script
</FilesMatch>
FCGIWrapper /var/www/php-fcgi-scripts/web73/.php-fcgi-starter .php
FCGIWrapper /var/www/php-fcgi-scripts/web73/.php-fcgi-starter .php3
FCGIWrapper /var/www/php-fcgi-scripts/web73/.php-fcgi-starter .php4
FCGIWrapper /var/www/php-fcgi-scripts/web73/.php-fcgi-starter .php5
Options +ExecCGI
AllowOverride All
Require all granted
</Directory>
# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web73 client1
</IfModule>
<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /home/l3p/apache_sites/clients/client1/web73/webdav>
<ifModule mod_security2.c>
SecRuleRemoveById 960015
SecRuleRemoveById 960032
</ifModule>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /home/l3p/apache_sites/clients/client1/web73/tmp/DavLock
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>
知道会发生什么吗?如何解决问题?
解决方案
我建议在您的日志中查看更多信息。我有一个类似的问题。当我刚刚搜索 503 错误时,我只收到了您的错误消息。当我查看它周围的消息时,我看到:
mod_lsapi: [host <domain_name>] [req GET / HTTP/1.1]
Could not connect to lsphp backend: connect to lsphp failed: 110
我的服务器使用 cPanel 进行管理。进入 cpanel 并手动选择 PHP 版本解决了这个问题。我不确定您是否也一样,但错误消息可能会帮助您缩小问题范围。
推荐阅读
- javascript - 导航菜单项冲突
- ios - NSLocalizedString 总是返回大写的文本
- optaplanner - 在其中一个从范围中获取后,如何将所有相关实体变量设置为相同的值?
- mysql - SQL - 随着时间的推移价格上涨
- python - 如何构建具有多个文件和内部依赖项的项目以上传到 PyPI
- ios - 将 DJI 视频源与 Vision Framework 结合使用
- ruby-on-rails - 如何使用两个 for 循环优化程序
- django - 尽管是 TestCase,Django 测试数据仍然存在于多个测试中
- r - 为多个空间图形绘制相同的图例
- c# - 将现有用户添加到现有组时出现 C# 错误