2017-01-28 30 views
1

我在OpenBSD 6.0中安装了phpMyadmin,当我做cp /var/www/conf/modules.sample/phpmyadmin.conf /var/www/conf/modules/并重新启动apache时,它无法工作。Apache2不会以phpMyadmin默认模块启动 - OpenBSD 6.0

在错误日志,它说:

[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|[email protected]|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> 
+0

该错误不作一大堆的感觉;它真的出现在你试图访问phpMyAdmin的同时吗?也许相关:http://stackoverflow.com/questions/1661802/apache-server-keeps-crashing-caught-sigterm-shutting-down#1661888 –

回答

1

你可以尝试改变从该目录permision:

<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>