Apache2 不会以 phpMyadmin 默认模块启动 - OpenBSD 6.0

Posted

技术标签:

【中文标题】Apache2 不会以 phpMyadmin 默认模块启动 - OpenBSD 6.0【英文标题】:Apache2 won't start with phpMyadmin default module - OpenBSD 6.0 【发布时间】:2017-06-13 19:13:49 【问题描述】:

我在 OpenBSD 6.0 中安装了 phpMyadmin,当我执行 cp /var/www/conf/modules.sample/phpmyadmin.conf /var/www/conf/modules/ 并重新启动 apache 时,它​​无法工作。

在错误日志中显示:

[mpm_prefork:notice] [pid 35797] AH00169: caught SIGTERM, shutting down

我必须删除 /var/www/conf/modules/phpmyadmin.conf 才能让 apache 恢复活力

phpmyadmin.conf 内容为:

# $OpenBSD: phpMyAdmin-httpd.conf,v 1.2 2013/01/18 15:17:43 giovanni Exp $

Alias /phpMyAdmin /var/www/phpMyAdmin

<IfModule !mod_rewrite.c>
        LoadModule rewrite_module /usr/lib/apache/modules/mod_rewrite.so

        RewriteEngine on

        # Allow only GET and POST verbs
        RewriteCond %REQUEST_METHOD !^(GET|POST)$ [NC,OR]



        # Ban Typical Vulnerability Scanners and others
        # Kick out Script Kiddies
        RewriteCond %HTTP_USER_AGENT ^(java|curl|wget).* [NC,OR]
        RewriteCond %HTTP_USER_AGENT ^.*(libwww-perl|curl|wget|python|nikto|wkito|pikto|scan|acunetix).* [NC,OR]
        RewriteCond %HTTP_USER_AGENT ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]

        # Ban Search Engines, Crawlers to your administrative panel
        # No reasons to access from bots
        # Ultimately Better than the useless robots.txt
        # Did google respect robots.txt?
        # Try google: intitle:phpMyAdmin intext:"Welcome to phpMyAdmin *.*.*" intext:"Log in" -wiki -forum -forums -questions in
text:"Cookies must be enabled"
        RewriteCond %HTTP_USER_AGENT ^.*(AdsBot-Google|ia_archiver|Scooter|Ask.Jeeves|Baiduspider|Exabot|FAST.Enterprise.Crawl
er|FAST-WebCrawler|www\.neomo\.de|Gigabot|Mediapartners-Google|Google.Desktop|Feedfetcher-Google|Googlebot|heise-IT-Markt-Crawle
r|heritrix|ibm.com\cs/crawler|ICCrawler|ichiro|MJ12bot|MetagerBot|msnbot-NewsBlogs|msnbot|msnbot-media|NG-Search|lucene.apache.o
rg|NutchCVS|OmniExplorer_Bot|online.link.validator|psbot0|Seekbot|Sensis.Web.Crawler|SEO.search.Crawler|Seoma.\[SEO.Crawler\]|SE
Osearch|Snappy|www.urltrends.com|www.tkl.iis.u-tokyo.ac.jp/~crawler|SynooBot|crawleradmin.t-info@telekom.de|TurnitinBot|voyager|
W3.SiteSearch.Crawler|W3C-checklink|W3C_Validator|www.WISEnutbot.com|yacybot|Yahoo-MMCrawler|Yahoo\!.DE.Slurp|Yahoo\!.Slurp|Yaho
oSeeker).* [NC]
        RewriteRule .* - [F]
</IfModule>

<Directory /var/www/phpMyAdmin>
        AllowOverride All

        # Default to only permitting access from localhost.
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
</Directory>

【问题讨论】:

这个错误没有多大意义;它真的出现在您尝试访问 phpMyAdmin 的同时吗?也许相关:***.com/questions/1661802/… 【参考方案1】:

您可以尝试从以下位置更改此目录权限吗:

<Directory /var/www/phpMyAdmin>
 AllowOverride All
 Order deny,allow 
Deny from all 
Allow from 127.0.0.1 
</Directory>

收件人:

<Directory /var/www/phpMyAdmin>

Require all granted 
 </Directory>

【讨论】:

以上是关于Apache2 不会以 phpMyadmin 默认模块启动 - OpenBSD 6.0的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu 14.04 服务器:phpMyAdmin 的 Apache2 问题

拒绝访问 phpmyadmin

安装 phpmyadmin 后 Apache2 configtest 失败

安装 phpmyadmin 不选择 apache2 或 lighttpd

Ubuntu上的Mysql apache2 phpmyadmin

apache2.4 + php-fpm + phpmyadmin 在 debian