- 问题:SecureCRT远程重启apache2错误且httpd.conf为空
- /etc/init.d/apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
...done.
- google上对策:
- Open a terminal
-
Open the
/etc/apache2/httpd.conf
file:sudo editor /etc/apache2/httpd.conf # [1]
-
By default, it would be blank(空文件). Simply add the following line:
ServerName localhost
-
Save the file and exit
-
Restart the server
sudo service apache2 restart
-
大意:直接往空文件httpd.conf添加一句ServerName localhost再启动,修改后成功
httpd.conf为空
最新推荐文章于 2023-06-17 15:40:29 发布