无法在 Xampp 中更改 Apache 端口号 [英] Unable to change Apache port number in Xampp
问题描述
我刚刚下载了 Xampp 服务器 xampp-win32-1.8.2-0-VC9Windows 的 .zip 文件并尝试启动 apache 服务器.但是服务器无法启动并显示以下消息:
I just downloaded Xampp server xampp-win32-1.8.2-0-VC9.zip file for windows and tried to start the apache server. But the server failed to start with the following message:
XAMPP now starts as a console application.
Instead of pressing Control-C in this console window, please use xampp_stop.exe
to stop XAMPP, because it lets XAMPP end any current transactions and cleanup
gracefully.
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : AH00072: make_sock: could not bind to address 0.0.0.0:
80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
很明显80号端口已经被占用了.
So clearly the port number 80 is already occupied.
于是我去了apache/conf/httpd.conf文件,找到了这一行:
So I went to the apache/conf/httpd.conf file and found the line:
#Listen 12.34.56.78:80
Listen 80
并将上面的第二行改为
Listen 8010
所以服务器现在必须从端口号 8010 开始.但它从 https 默认端口号 443 开始,并再次给出相同的错误:
So the server must now start at port number 8010.But its instead starting on https default port number 443 and again giving the same error:
XAMPP now starts as a console application.
Instead of pressing Control-C in this console window, please use xampp_stop.exe
to stop XAMPP, because it lets XAMPP end any current transactions and cleanup
gracefully.
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : AH00072: make_sock: could not bind to address 0.0.0.0:
443
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
那么我应该如何让服务器在我选择的端口号上运行,为什么我的方法不起作用.据我所知,这种方法曾经适用于早期版本的 xampp,但现在不起作用.
So how should I make the server run at the port number of my choice and why is my approach not working. As far as I can remember, the approach used to work on earlier versions of xampp but is not working now.
推荐答案
我运行 setup_xampp.bat 并使用 apache 的配置按钮从控制面板编辑端口号.然后我找到这一行 Listen 80
并通过编辑这一行将端口号更改为 81.这为我解决了这个问题.
I ran setup_xampp.bat and edited the port number from the control panes using the config button of apache. Then I found this line Listen 80
and change the port number to 81 by editing this line. This solved the problem for me.
这篇关于无法在 Xampp 中更改 Apache 端口号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!