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

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

问题描述

关于帖子

关于错误

<块引用>

无法可靠地确定服务器的完全限定域名,使用 127.0.0.1.设置服务器名称"...

我尝试了在文件 /etc/apache2/apache2.conf 中添加 ServerName localhost 的选项 https://askubuntu.com/questions/454497/apache2-could-not-reliably-determine-the-服务器完全限定域名 但我不知道那是否是正确的文件,因为我正在使用 apache 2.4 (/usr/local/etc/apache2/2.4/httpd.配置)

此外,如果我运行命令 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没有可用的侦听套接字,正在关闭

在我的文件/etc/apache2/httpd.conf

我有这个:

# 将其更改为侦听特定 IP 地址,如下所示# 防止 Apache 进入所有绑定的 IP 地址.##听 12.34.56.78:80听 80# 用户/组:运行 httpd 的用户/组的名称(或 #number).# 创建一个专门的用户和组通常是一个好习惯# 运行 httpd,与大多数系统服务一样.#用户 amhg集团员工# ServerName 给出了服务器用来标识自己的名称和端口.# 这通常可以自动确定,但我们建议您指定# 它明确地防止在启动过程中出现问题.## 如果您的主机没有注册的 DNS 名称,请在此处输入其 IP 地址.#服务器名称本地主机DocumentRoot/Users/amhg/Sites<目录/Users/amhg/Sites>#允许覆盖所有

我取消注释 LoadModule rewrite_module libexec/mod_rewrite.so

有什么建议吗?提前致谢!

解决方案

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

rpm -qa |grep httpd

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

你能把你所有的日志文件都发过来吗?

你能解释一下你在浏览器中看到的内容吗:

http://localhost

Concerning the post Apache versions conflict. I tried again the installation of apache following the steps from https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions

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

Result of apache log

Regarding the error

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

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)

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

In my file /etc/apache2/httpd.conf

I have this:

# 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

and I uncommented LoadModule rewrite_module libexec/mod_rewrite.so

Any suggestions? Thank you in advance!

解决方案

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天全站免登陆