怎么修改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的端口号就可以。
步骤很简单:点击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的端口号就可以。
相关文章推荐
- apache-cxf 使用整理
- apache-hama-kcore
- Apache Mahout的KMeans算法测试
- Ubuntu Apache2开启mod_rewrite解决laravel路由失效问题
- cloud not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:release from any
- MAC 搭建腾讯云(centOS) apache+php+mysql 持续更新...
- LAMP环境(linux+apache+mysql+php)配置
- 64位Win7系统中配置Apache+Mysql+PHP环境
- Linux中如何安装Apache服务器
- apache的rewrite_module模块加载
- [转]Apache配置详解
- 利用Apache的commons-beanutils和commons-collections包实现Java对象的按属性排序
- apache用户认证配置
- apache配置解析php
- Apache CXF实现WebService入门教程(附完整源码)
- 解决apache没有权限响应的问题
- windows8.1下Apache+Php+MySQL配置步骤
- java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory错误
- 压测 apache ab 初探
- Andorid Unable to execute dex: Multiple dex files define Lorg/apache/commons/collections/Buffer