我通常使用以下命令安装 mysql、apache 和 php
sudo apt-get install apache2 php5 libapache2-mod-php5 php5-mysql
但在我全新升级到 Linux mint 14 后,出现了这两个错误
* Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Sun Mar 10 01:44:38 2013] [warn] NameVirtualHost *:8080 has no VirtualHosts
[ OK ]
Setting up libapache2-mod-php5 (5.4.6-1ubuntu1.1) ...
* Reloading web server config
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Sun Mar 10 01:44:39 2013] [warn] NameVirtualHost *:8080 has no VirtualHosts
[ OK ]
当我重新启动 Apache 服务器时,我也遇到了同样的错误。因此,我无法更改本地主机的目录。
答案1
要解决该问题,您需要编辑您的apache2.conf文件(/etc/apache2/apache2.conf
),并设置ServerName
。
只需在文件中添加以下行:
ServerName localhost
保存文件并退出编辑器。别忘了重新启动 apache。