WampServer端口的修改

baidu_21220449 2014-10-05 11:06:16
端口被占用了,要怎么讲80改为90?
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 0.0.0.0:80
Listen [::0]:80
#
# Dynamic Shared Object (DSO) Support
#
#
# 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:80
HostnameLookups Off

httpd-ssl.conf文件中
Listen 443
##
## SSL Global Context
##
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
##
<VirtualHost _default_:443>

# General setup for the virtual host
DocumentRoot "c:/Apache24/htdocs"
ServerName www.example.com:443
ServerAdmin admin@example.com
ErrorLog "c:/Apache24/logs/error.log"
TransferLog "c:/Apache24/logs/access.log"
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on

...全文
757 16 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
Engineer.yun 2018-06-29
  • 打赏
  • 举报
回复
端口默认的是80端口所以你改完端口以后还用localhost登陆是不行的 ,必须在localhost后面加英文冒号加新端口号
web_study_ 2016-04-04
  • 打赏
  • 举报
回复
我的问题已经解决。路径名不能有中文两个小时啊
web_study_ 2016-04-04
  • 打赏
  • 举报
回复
同问,楼主怎么改的
Luluyoyo 2015-06-25
  • 打赏
  • 举报
回复
请问楼主,你是用了什么办法把端口改过来的呀?
xuzuning 2014-10-05
  • 打赏
  • 举报
回复
:80 --> :90
baidu_21220449 2014-10-05
  • 打赏
  • 举报
回复
非常感谢大家,

以后还请大家多多指教
傲雪星枫 2014-10-05
  • 打赏
  • 举报
回复
Listen 0.0.0.0:90 Listen [::0]:90 ServerName localhost:90
baidu_21220449 2014-10-05
  • 打赏
  • 举报
回复
引用 7 楼 fdipzone 的回复:
1.找到httpd.conf 2.然后查找 Listen 80 3.把80改为90 4.重启wamp
Listen 80找不到 80的话就找到下面 #Listen 12.34.56.78:80 Listen 0.0.0.0:80 Listen [::0]:80 ServerName localhost:80 怎么改,重启后,图标一直是黄色的
baidu_21220449 2014-10-05
  • 打赏
  • 举报
回复
引用 6 楼 zy205817 的回复:
1.在cmd 执行 netstat -o -an >c:\ip.txt
2.去c盘下找到ip.txt,找到端口=80的pid
3.在任务管理器查看pid的进程名称,是否为httpd。



这样就说明端口被占用了吗?
baidu_21220449 2014-10-05
  • 打赏
  • 举报
回复
引用 5 楼 A9925 的回复:
默认是80 改了之后加端口号localhost:90 试试 另外看是哪个程序占的80可以停掉
怎么看是谁占用了端口80
傲雪星枫 2014-10-05
  • 打赏
  • 举报
回复
1.找到httpd.conf 2.然后查找 Listen 80 3.把80改为90 4.重启wamp
码无边 2014-10-05
  • 打赏
  • 举报
回复
1.在cmd 执行 netstat -o -an >c:\ip.txt 2.去c盘下找到ip.txt,找到端口=80的pid 3.在任务管理器查看pid的进程名称,是否为httpd。
  • 打赏
  • 举报
回复
默认是80 改了之后加端口号localhost:90 试试 另外看是哪个程序占的80可以停掉
baidu_21220449 2014-10-05
  • 打赏
  • 举报
回复
引用 3 楼 xuzuning 的回复:
同名项是后面的覆盖前面的
所以只要最后有
Listen 90
ServerName localhost
即可

ServerName localhost:90
改完后我的WampServer还是出错
重启后,图标一直是黄色的

这样是不是80端口被占用?

访问localhost

求大神指教
xuzuning 2014-10-05
  • 打赏
  • 举报
回复
同名项是后面的覆盖前面的 所以只要最后有 Listen 90 ServerName localhost 即可
baidu_21220449 2014-10-05
  • 打赏
  • 举报
回复
引用 1 楼 xuzuning 的回复:
:80 --> :90
改这四次吗? #Listen 12.34.56.78:90 Listen 0.0.0.0:90 Listen [::0]:90 ServerName localhost:90

21,894

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧