关于帖子Apache versions conflict。我按照https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions
中的步骤再次尝试安装apache如果我想从本地网站文件夹中测试 localhost ,我仍然会遇到一些问题。
apache日志的结果
关于错误
无法可靠地确定服务器的完全限定域名, 使用127.0.0.1。设置'ServerName'...
我尝试在文件 /etc/apache2/apache2.conf https://askubuntu.com/questions/454497/apache2-could-not-reliably-determine-the-servers-fully-qualified-domain-name中添加 ServerName localhost ,但我不知道是不是这是正确的文件,因为我正在使用apache 2.4(/usr/local/etc/apache2/2.4/httpd.conf)
此外,如果我运行命令 sudo apachectl -k restart 我得到了这个
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
在我的文件 /etc/apache2/httpd.conf
我有这个:
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User amhg
Group staff
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost
DocumentRoot /Users/amhg/Sites
<Directory /Users/amhg/Sites>
#
AllowOverride All
我取消注释LoadModule rewrite_module libexec/mod_rewrite.so
有什么建议吗? 提前谢谢!
答案 0 :(得分:0)
你可以通过命令看到你所有的apache安装版本:
rpm -qa | grep httpd
在您的日志文件中我没有看到任何错误。
你能发送所有日志文件吗?
你可以解释一下你在浏览器中看到的内容: