首页 > Web开发 > 详细

Linux下修改Apache即httpd的端口

时间:2020-09-11 16:08:46      阅读:141      评论:0      收藏:0      [点我收藏+]

原文出处:Linux下修改Apache即httpd的端口

停止httpd服务

[root@67 sbin]# service httpd stop
Redirecting to /bin/systemctl stop httpd.service

查看httpd的状态,确认httpd服务已经停止

[root@67 sbin]# service httpd status
Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:httpd(8)
           man:apachectl(8)

8月 23 03:36:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloading The Apache HTTP Server.
8月 23 03:36:07 67.59.247.60.static.bjtelecom.net systemd[1]: Reloaded The Apache HTTP Server.
8月 30 03:29:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloading The Apache HTTP Server.
8月 30 03:29:07 67.59.247.60.static.bjtelecom.net systemd[1]: Reloaded The Apache HTTP Server.
9月 05 03:37:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloading The Apache HTTP Server.
9月 05 03:37:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloaded The Apache HTTP Server.
9月 06 03:27:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloading The Apache HTTP Server.
9月 06 03:27:11 67.59.247.60.static.bjtelecom.net systemd[1]: Reloaded The Apache HTTP Server.
9月 11 14:29:34 67.59.247.60.static.bjtelecom.net systemd[1]: Stopping The Apache HTTP Server...
9月 11 14:29:35 67.59.247.60.static.bjtelecom.net systemd[1]: Stopped The Apache HTTP Server.

查找httpd.conf配置文件的存放路径

find / -name httpd.conf

编辑httpd.conf配置文件

查找Listen配置段

技术分享图片

 

 修改Listen后面的端口,默认是80,这里修改为8080

保存并退出

修改后需要再次启动httpd服务

技术分享图片

 

Linux下修改Apache即httpd的端口

原文:https://www.cnblogs.com/kaerxifa/p/13651717.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!