通常当我登录系统时,apache 会自动启动并正常工作,但今天却没有。
然后我尝试启动,service apache2 start
然后它显示以下错误。
* Starting web server apache2
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:8
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address 127.0.0.1:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
*
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
这可能是什么问题?请帮我解决这个问题。
答案1
转到此文件 /etc/apache2/apache2.conf 并在文件末尾添加以下行
ServerName localhost
这将全局设置服务器指令。