Localhost不显示任何内容

时间:2014-03-11 05:58:42

标签: linux apache2 localhost debian lamp

在正常系统更新后,我的localhost没有显示它以前的任何内容。 可能的原因是什么呢? 但是,我能够连接到phpmyadmin。 如果localhost位置从/ var / www /更改为另一个,可能的位置是什么?

系统详情:

操作系统 - debian测试(Jessie)x86_64

Index of /
[ICO]   Name    Last modified   Size    Description
Apache/2.4.7 (Debian) Server at localhost Port 80

#/ usr / sbin / apache2 -V

[Tue Mar 11 21:41:55.901363 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Tue Mar 11 21:41:55.901541 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Tue Mar 11 21:41:55.901569 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Tue Mar 11 21:41:55.901583 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Tue Mar 11 21:41:55.901616 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Tue Mar 11 21:41:55.932506 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Tue Mar 11 21:41:55.932942 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Tue Mar 11 21:41:55.932966 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

#ps -ef | grep apache

root     16811     1  0 20:47 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16815 16811  0 20:47 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16816 16811  0 20:47 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16817 16811  0 20:47 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16818 16811  0 20:47 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16819 16811  0 20:47 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16820 16811  0 20:47 ?        00:00:00 /usr/sbin/apache2 -k start

1 个答案:

答案 0 :(得分:0)

这可能是因为系统更新导致系统根目录从/var/wwww更改为/var/www/html

要解决此问题,请转到:

/etc/apache2/sites-available/000-default.conf

并设置

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

您需要root权限才能编辑该文件。从终端

sudo gedit /etc/apache2/sites-available/000-default.conf 

然后编辑文件并保存。

此操作从终端重新启动服务器。

sudo service apache2 restart