系统redhat7

,httpd已经启动

[root@rhcsa conf.d]# netstat -tnpl | grep 443

tcp6 0 0 :::443 :::* LISTEN 1229/httpd

为什么如上命令只显示tcp6,而没有tcp ?

---------------------------------------------------

监听了tcp6后,tcp也可以用的。

虽然这个只显示了IPv6的端口监听,但并不代表只接受IPv6的连接,实际上,apache会以mapped address (::FFFF:a.b.c.d) 方式来接受IPv4的连接。除了少部分平台上,例如FreeBSD,NetBSD,OpenBSD之外, Apache在编译时,默认启用了 --enable-v4-mapped 选项。所以,Apache会同时接受IPv6和IPv4的连接请求。

除非是 IPV6_V6ONLY 模式开启,才需要两个不同的socket来分别监听IPv6和IPv4.IPV6_V6ONLY模式可以通过 sysctl net.ipv6.bindv6only 来控制,默认是关闭的。如果你实在愿意在netstat中只看到IPv4端口的监听,那么,你可以修apachezhttp.conf 中,将

Listen 80

修改为

Listen 0.0.0.0:80

----------------------------------------------------------------------------------------------------------

Please note

This document refers to the 2.2 version of Apache httpd, which is no longer maintained. The active release is documented here. If you have not already upgraded, please follow this link for more information.

You may follow this link to go to the current version of this document.

Binding

Available Languages: de | en | fr | ja | ko | tr

Configuring Apache to listen on specific addresses and ports.

See also

Overview

Related Modules

Related Directives

When Apache starts, it binds to some port and address on the local machine and waits for incoming requests. By default, it listens to all addresses on the machine. However, it may need to be told to listen on specific ports, or only on selected addresses, or a combination of both. This is often combined with the Virtual Host feature, which determines how Apache responds to different IP addresses, hostnames and ports.

The

For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:

Listen 80

Listen 8000

To make the server accept connections on port 80 for one interface, and port 8000 on another, use

Listen 192.0.2.1:80

Listen 192.0.2.5:8000

IPv6 addresses must be enclosed in square brackets, as in the following example:

Listen [2001:db8::a00:20ff:fea7:ccea]:80

Special IPv6 Considerations

A growing number of platforms implement IPv6, and APR supports IPv6 on most of these platforms, allowing Apache to allocate IPv6 sockets, and to handle requests sent over IPv6.

One complicating factor for Apache administrators is whether or not an IPv6 socket can handle both IPv4 connections and IPv6 connections. Handling IPv4 connections with an IPv6 socket uses IPv4-mapped IPv6 addresses, which are allowed by default on most platforms, but are disallowed by default on FreeBSD, NetBSD, and OpenBSD, in order to match the system-wide policy on those platforms. On systems where it is disallowed by default, a special

On the other hand, on some platforms, such as Linux and Tru64, the only way to handle both IPv6 and IPv4 is to use mapped addresses. If you want Apache to handle IPv4 and IPv6 connections with a minimum of sockets, which requires using IPv4-mapped IPv6 addresses, specify the --enable-v4-mapped

--enable-v4-mapped is the default on all platforms except FreeBSD, NetBSD, and OpenBSD, so this is probably how your Apache was built.

If you want Apache to handle IPv4 connections only, regardless of what your platform and APR will support, specify an IPv4 address on all

Listen 0.0.0.0:80

Listen 192.0.2.1:80

If your platform supports it and you want Apache to handle IPv4 and IPv6 connections on separate sockets (i.e., to disable IPv4-mapped addresses), specify the --disable-v4-mapped --disable-v4-mapped is the default on FreeBSD, NetBSD, and OpenBSD.

How This Works With Virtual Hosts

The

Available Languages: de | en | fr | ja | ko | tr

Comments

Notice:

This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.

linux下为什么只监听tcp6端口,httpd 443端口为什么只监听在tcp6上相关推荐

  1. linux下配置nginx ssl 认证 进行项目80,443端口开放配置

    在linux下安装nginx,首先需要安装 gcc-c++编译器.然后安装nginx依赖的pcre和zlib包.最后安装nginx即可. 腾讯云ssl认证网址 查看进程号 ps -ef|grep ng ...

  2. 80端口和443端口的区别

    一台服务器能提供的服务有很多,比如HTTP.FTP.Telnet等服务.为什么可以同时提供那么多服务呢?有一个很重要的原因是采用不同的端口分别提供不同的服务,比如:TCP/IP协议规定web默认80端 ...

  3. 服务器的80端口和443端口的区别是什么?

    一台服务器能提供的服务有很多,比如HTTP.FTP.Telnet等服务.为什么可以同时提供那么多服务呢?有一个很重要的原因是采用不同的端口分别提供不同的服务,比如:TCP/IP协议规定web默认80端 ...

  4. 80端口是什么服务使用的?80端口和443端口是默认开启的吗?

    一台服务器能提供的服务有很多,比如HTTP.FTP.Telnet等服务.为什么可以同时提供那么多服务呢?有一个很重要的原因是采用不同的端口分别提供不同的服务,比如:TCP/IP协议规定web默认80端 ...

  5. httpd 443端口为什么只监听在tcp6上

    https://segmentfault.com/q/1010000007087853/a-1020000007089455 系统redhat7,httpd已经启动 [root@rhcsa conf. ...

  6. Linux下利用nc命令来监控检测服务器的端口使用情况

    检测端口还在用telnet?太落伍把 有没有批量检测的方法?有的.我们用nc就可以快速检测端口的开放性. nc检测端口的用法 nc -z  -w 10  %IP%    %PORT% -z表示检测或者 ...

  7. 80端口、8080端口和443端口是什么用的

    80端口: 80是http协议的默认端口,在默认情况下,端口80(port 80)是服务器侦听网页客户端请求的端口.是在输入网站的时候其实浏览器(非IE)已经帮你输入协议了,所以你输入http//ba ...

  8. 80端口、443端口、8080端口、8000端口的区别

    一. 80.8000.8080.443都是不同的端口.服务器监听哪个端口,就需要访问哪个端口. 二. 80端口:HTTP协议的默认端口 监听80端口的进步性: 1.访问网站不需要输入端口号,浏览器自动 ...

  9. 转载:80端口、443端口、8080端口、8000端口的区别

    转载于:这位老哥 一. 80.8000.8080.443都是不同的端口.服务器监听哪个端口,就需要访问哪个端口. 二. 80端口:HTTP协议的默认端口 监听80端口的进步性: 1.访问网站不需要输入 ...

最新文章

  1. 技术图文:如何利用C# + Echarts 绘制「堆叠条形图」?
  2. “AI开发者大会”早鸟票抢购倒计时开始~
  3. 如何查看mysql索引
  4. 【错误记录】编译 Android 版本的 ijkplayer 报错 ( You must define ANDROID_NDK before starting. | 下载指定版本 NDK )
  5. 2020年高等数学方法与提高(上海理工大学)学习笔记:常微分方程
  6. 重温强化学习之深度强化学习
  7. spring aop实现过程之二Spring AOP中拦截器链
  8. 端午回家,听完你是做程序员,你家里人是什么反应?
  9. vs为什么打了断点不断_为什么西餐厅里的牛排又嫩又多汁?原来大厨都做了“这一步”...
  10. Springboot 2.x上传文件大小限制
  11. 网络位置可以看到另一个人的电脑_计算机组成原理(一)- 冯·诺依曼体系结构...
  12. 【LeetCode】33. Search in Rotated Sorted Array 解题小结
  13. redis windows切割日志文件_开发者笔记:Windows下搭建简易单机Redis集群测试环境...
  14. 计算机组成原理 最新教材,《计算机组成原理》东南大学教材.pdf
  15. WPS文字教你制作米字本即用于临摹练字的米字格
  16. 03 vsftpd 登录过程的调试
  17. 傅里叶变换复数形式的实部代表什么_二维傅里叶变换与逆变换基于Unity的实现...
  18. C语言根据汉字拼音首字母排序
  19. 【转载】52nlp博客上的资源
  20. 虚拟机怎么安装软件 Mac虚拟机怎么安装软件

热门文章

  1. spring boot整合lua 三步曲
  2. 房产投资01 - 买什么样的房子会上涨
  3. python数据清洗与准备:缺失值、重复值、异常值处理
  4. mysql plugin 空_mysql 启动报错 Could not open mysql.plugin table 的修复
  5. vivado 2018.2\2018.3\2019.1下载
  6. 2021年危险化学品经营单位主要负责人最新解析及危险化学品经营单位主要负责人考试试卷
  7. 为什么不使用ServiceStack.Redis dll ?而使用NewLife.Redis、NewLife.Core ?使用NewLife的Redis工具类
  8. 【IEEE_Verilog-12.4】generate的用法
  9. 表单验证[用户名、邮箱、密码、重复密码]
  10. 用SSH压缩和解压zip,gz,.tar.gz等格式的正确方法