- How can I get XAMPP working on port 80 under Windows 10?
-
By default, Windows 10 starts Microsoft IIS on port 80, which is the same default port used by Apache in XAMPP. As a result, Apache cannot bind to port 80.
To disable IIS from running on port 80, follow these steps:
- Open the Services panel in Computer Management.
- Search for the 'World Wide Web Publishing Service' and select it.
- Click the link to 'Stop the service'.
- Double-click the service name.
- In the 'Startup type' field, change the startup type to 'Disabled'.
- Click 'OK' to save your changes.
You should now be able to start Apache in XAMPP on port 80.
For more information, refer to the 'Troubleshoot Apache Startup Problems' guide included with XAMPP or this forum post.
由于本机已经存在了IIS服务器,同时IIS使用的是80端口,因此在安装了Xammp之后Apache无法正产启动,显示端口已经被占用,因此需要修改端口号,百度了一下,说是需要修改\apache\conf\httpd.conf的监听端口,
修改之后果然可以启动,但是在单击“admin”时
无法直接显示主页,因为默认使用的地址是localhost,而不是localhost:8081,但是在我想访问的是Apache现在的主页而不是一个不能访问了地址当我想访问时,需要我手动输入对应的端口号,因此需要点击“admin”时也能访问,请参考下图所示:
在服务和端口设置中我们能清楚的看到,每一个服务使用的端口号,所以配置起来很方便。
写此文是为了记录在为了修改Apache端口号的过程中走得弯路,虽然只有寥寥数字,但是可以给自己留一个记忆。不足之处,请谅解,留言,方便更新补全。