您的位置:首页 > 运维架构 > Apache

怎么修改Xampp中Apache服务器的端口号

2015-10-31 23:25 561 查看
下载安装好Xampp直接start apache服务,可能发现443端口被其他服务所占有,这时候我有必要修改一下apache服务器的端口号:

步骤很简单:点击Config按钮,可以看到有两个配置文件httpd.conf和httpd-ssl.conf;现在要根据端口号错误来更改apache的端口号,如果是port 443错误,更改http-ssl.conf文件中的Listen监听端口,如果是80错误,更改httpd.conf文件中Listen



打开httpd.conf文件,找到设置端口的配置信息如下:

#

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#

# 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

打开httpd-ssl.conf文件,找到设置端口的配置信息如下:

#

# When we also provide SSL we have to listen to the

# standard HTTP port (see above) and to the HTTPS port

#

# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two

# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"

#

Listen 443

ps:配置文件比较长,眼睛不好找,按Ctrl+F查找关键字就快多了,比如直接找80或者443就行了,马上跳到该段的配置信息了。

直接更改下Listen的端口号就可以。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: