正常系统更新后,我的本地主机没有显示任何以前的内容。 这可能是什么原因。 但是,我能够连接到 phpmyadmin。 如果本地主机位置从/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
最佳答案
这可能是由于系统更新,您的系统根目录从/var/www
更改为/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
关于linux - 本地主机不显示任何内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22317601/