在其上下文中,该请求的地址无效 :make_sock:could not bind address.....

feifanhanmc 2016-04-26 07:55:05
Apache httpd.conf文件中试图绑定自己的公网ip
Listen后添加我的公网IP:80(Listen myIP:80)
如上,我添加了自己的公网ip地址。
但是启动apache的时候出现错误:
<OS 10049>在其上下文中,该请求的地址无效 :make_sock:could not bind address.....

网上基本上都说是进程被占用了,但是我这边并没有查到进程。
Apache error logs如下:
Starting the Apache2.2 service
The Apache2.2 service is running.
pid file C:/Program Files (x86)/Apache

Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Tue Apr 26 17:21:20 2016] [warn] mod_wsgi: Compiled for Python/2.7.

[Tue Apr 26 17:21:20 2016] [warn] mod_wsgi: Runtime using Python/2.7.11.

[Tue Apr 26 17:21:20 2016] [notice] Apache/2.2.19 (Win32) mod_wsgi/3.3 Python/2.7.11 configured --

resuming normal operations

[Tue Apr 26 17:21:20 2016] [notice] Server built: May 20 2011 17:39:35

[Tue Apr 26 17:21:20 2016] [notice] Parent: Created child process 2840

[Tue Apr 26 17:21:20 2016] [warn]mod_wsgi: Compiled for Python/2.7.

[Tue Apr 26 17:21:20 2016] [warn] mod_wsgi: Runtime using Python/2.7.11.

[Tue Apr 26 17:21:20 2016] [notice] Child 2840: Child process is running

[Tue Apr 26 17:21:20 2016] [notice] Child 2840: Acquired the start mutex.

[Tue Apr 26 17:21:20 2016] [notice] Child 2840: Starting 64 worker threads.

[Tue Apr 26 17:21:20 2016] [notice] Child 2840: Starting thread to listen on port 80.

[Tue Apr 26 17:25:16 2016] [notice] Parent: Received shutdown signal -- Shutting down the server.

[Tue Apr 26 17:25:16 2016] [notice] Child 2840: Exit event signaled. Child process is ending.

[Tue Apr 26 17:25:17 2016] [notice] Child 2840: Released the start mutex

[Tue Apr 26 17:25:18 2016] [notice] Child 2840: All worker threads have exited.

[Tue Apr 26 17:25:18 2016] [notice] Child 2840: Child process is exiting

[Tue Apr 26 17:25:18 2016] [notice] Parent: Child process exited successfully.



背景说明:
在用Python搭建web应用之前尝试用过WAMP(Windows Apache MySQL PHP),并没有设置绑定自己的公网ip就可以直接

用了
现在想Python搭建web应用,启动Apache成功后,发现:
通过localhost/myPrj可以正常访问
但是 公网IP/myPrj却不行,于是尝试自己添加绑定公网IP,结果出现如上错误
...全文
1119 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
feifanhanmc 2016-05-22
  • 打赏
  • 举报
回复
自己来回答: 修改httpd.conf文件中Listen 127.0.0.1:80为Listen 0.0.0.0:80即可

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧