当前位置:Gxlcms > PHP教程 > WampServer端口的修改

WampServer端口的修改

时间:2021-07-01 10:21:17 帮助过:5人阅读

端口被占用了,要怎么讲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.
##


# 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


回复讨论(解决方案)

:80 --> :90

:80 --> :90


改这四次吗?
#Listen 12.34.56.78:90
Listen 0.0.0.0:90
Listen [::0]:90
ServerName localhost:90

同名项是后面的覆盖前面的
所以只要最后有
Listen 90
ServerName localhost
即可

同名项是后面的覆盖前面的
所以只要最后有
Listen 90
ServerName localhost
即可


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

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

访问localhost

求大神指教

默认是80
改了之后加端口号localhost:90 试试
另外看是哪个程序占的80可以停掉

1.在cmd 执行 netstat -o -an >c:\ip.txt
2.去c盘下找到ip.txt,找到端口=80的pid
3.在任务管理器查看pid的进程名称,是否为httpd。

1.找到httpd.conf
2.然后查找 Listen 80
3.把80改为90
4.重启wamp

默认是80
改了之后加端口号localhost:90 试试
另外看是哪个程序占的80可以停掉



怎么看是谁占用了端口80

1.在cmd 执行 netstat -o -an >c:\ip.txt
2.去c盘下找到ip.txt,找到端口=80的pid
3.在任务管理器查看pid的进程名称,是否为httpd。




这样就说明端口被占用了吗?

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

怎么改,重启后,图标一直是黄色的

Listen 0.0.0.0:90
Listen [::0]:90
ServerName localhost:90

非常感谢大家,

以后还请大家多多指教

人气教程排行