0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntu14.04 で Apache2 が動かなくなった

Posted at

古い Ubuntu14.04 でまとめて apt-get upgrade したら Apache2 でエラー。


sudo service apache2 restart
 * Restarting web server apache2                                                                                                        [fail] 
 * The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 21apache20 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.

「apache2 error Could not open configuration file /etc/apache2/conf.d/: No such file or directory - Ask Ubuntu」
https://askubuntu.com/questions/365454/apache2-error-could-not-open-configuration-file-etc-apache2-conf-d-no-such-fi

を参考に以下の処理を行う。

httpd.conf の生成


$ cd /etc/apache2
$ sudo touch httpd.conf

conf.dディレクトリの生成

更に、


$ sudo service apache2 restart
 * Restarting web server apache2                                                                                                        [fail] 
 * The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 234 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.

と出たので以下のようにして対処。


$ sudo mkdir conf.d

動作した


$ sudo service apache2 restart
 * Restarting web server apache2                                                                                                               AH00112: Warning: DocumentRoot [/home/sensho-ds/public_html] does not exist
                                                                                                                                        [ OK ]
$
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?