Apache版本冲突(续) [英] Apache version conflict (cont)

查看:167
本文介绍了Apache版本冲突(续)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于帖子 Apache版本冲突.我按照 https://getgrav的步骤再次尝试了Apache的安装. .org/blog/macos-sierra-apache-multiple-php-versions

如果要从本地 Site 文件夹中测试 localhost ,我仍然遇到一些问题.

I still have some problems if I want to test localhost from my local Site folder.

apache日志的结果

Result of apache log

关于错误

无法可靠地确定服务器的标准域名, 使用127.0.0.1.设置"ServerName" ...

Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName'...

我尝试了在文件/etc/apache2/apache2.conf 中添加 ServerName localhost 的选项.

I tried the option of adding ServerName localhost in the file /etc/apache2/apache2.conf https://askubuntu.com/questions/454497/apache2-could-not-reliably-determine-the-servers-fully-qualified-domain-name but I don't know if that is that is the right file, because i'm working with apache 2.4 (/usr/local/etc/apache2/2.4/httpd.conf)

另外,如果我运行命令 sudo apachectl -k restart ,我会得到

Additionally, if I run the command sudo apachectl -k restart I got this

(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

In my file /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

有什么建议吗? 预先谢谢你!

Any suggestions? Thank you in advance!

推荐答案

您可以使用以下命令查看所有apache安装版本:

you can see all of your apache installed version with command :

rpm -qa | grep httpd

在您的日志文件中,我没有看到任何错误.

in your log file I do not see any error.

您可以发送所有日志文件吗?

can you sent all of your log file?

,您能否解释一下转到时在浏览器中看到的内容?

and can you explain what do you see in browser when go to :

http://localhost

这篇关于Apache版本冲突(续)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆