簡體   English   中英

安裝phpmyadmin后Apache2 configtest失敗

[英]Apache2 configtest failed after installing phpmyadmin

你好我試圖安裝phpmyadmin然后我堅持使用apache2重新啟動...當我試圖修復它時,我做了以下的事情:

sudo apt-get remove apache2
sudo apt-get autoremove
sudo apt-get install apache2

然后:

sudo nano /etc/apache2/apache2.conf 

我在最后添加:

Include /etc/phpmyadmin/apache.conf

然后重啟

/etc/init.d/apache2 restart

它仍然無法工作,所以我決定安裝以下兩個包:

apt-get install libapache2-mod-php5
apt-get install php5.6 libapache2-mod-php5.6

重啟時有以下輸出:

 * Restarting Apache httpd web server apache2                                    [fail] 
 * The apache2 configtest failed.
Output of config test was:
Segmentation fault (core dumped)
Action 'configtest' failed.
The Apache error log may have more information.

日志文件:

cat /var/log/apache2/access.log

127.0.0.1 - - [11/Jan/2017:19:17:01 +0100] "GET / HTTP/1.1" 200 3595 "-" "Mozilla/5.0 ($
127.0.0.1 - - [11/Jan/2017:19:17:01 +0100] "GET /icons/ubuntu-logo.png HTTP/1.1" 404 51$
127.0.0.1 - - [11/Jan/2017:19:17:01 +0100] "GET /favicon.ico HTTP/1.1" 404 500 "http://$
127.0.0.1 - - [11/Jan/2017:19:17:06 +0100] "GET /phpmyadmin HTTP/1.1" 404 499 "-" "Mozi$
127.0.0.1 - - [11/Jan/2017:19:17:56 +0100] "GET /phpmyadmin/setup/index.php HTTP/1.1" 4$
127.0.0.1 - - [11/Jan/2017:19:20:27 +0100] "GET /phpmyadmin HTTP/1.1" 404 500 "-" "Mozi$

錯誤日志的輸出:

[Wed Jan 11 18:58:27.464400 2017] [mpm_prefork:notice] [pid 1174] AH00163: Apache/2.4.23 (Ubuntu) configured -- resuming normal operations
[Wed Jan 11 18:58:27.464420 2017] [core:notice] [pid 1174] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jan 11 19:19:27.443455 2017] [mpm_prefork:notice] [pid 1174] AH00169: caught SIGTERM, shutting down
[Wed Jan 11 19:20:18.120230 2017] [mpm_prefork:notice] [pid 4527] AH00163: Apache/2.4.23 (Ubuntu) configured -- resuming normal operations
[Wed Jan 11 19:20:18.120268 2017] [core:notice] [pid 4527] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jan 11 19:21:19.771711 2017] [mpm_prefork:notice] [pid 4527] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Wed Jan 11 19:21:19.787009 2017] [mpm_prefork:notice] [pid 4527] AH00163: Apache/2.4.23 (Ubuntu) configured -- resuming normal operations
[Wed Jan 11 19:21:19.787018 2017] [core:notice] [pid 4527] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jan 11 19:21:20.670808 2017] [mpm_prefork:notice] [pid 4527] AH00169: caught SIGTERM, shutting down

我正在使用elementaryOS。 在這種情況下,任何人都知道該怎么辦?

  1. 通過查找目錄來檢查已安裝的php數量以及apache中需要/啟用的數量: ls / etc / apache2 / mods-enabled
  2. 禁用不需要的php模塊。在我的情況下它是php5(我必須使用php7.1而不是php5),所以輸入: a2dismod php5
  3. 然后重啟你的apache服務器: /etc/init.d/apache2 restart

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM