【发布时间】:2015-02-09 18:18:39
【问题描述】:
我正在通过 CentOS VPS 在预装了 Apache 的 Bluehost 上部署 Web2py 应用程序。
我已经在/home/username 中手动完成了安装 Web2py、Python 和一些其他软件的过程。当我在/home/username/web2py 中运行以下命令通过Rocket 在端口8000 python web2py.py --ip xxx.xx.xx.xx --port=8000 启动Web2py 时,我和其他人可以成功访问http://xxx.xx.xx.xx/8000 或http://mywebsite.com/8000 以查看Web2py 的欢迎屏幕(以及最终我的应用程序)。
但是,当我尝试运行 python web2py.py --ip xxx.xx.xx.xx --port=80 以便可以通过 http://xxx.xx.xx.xx/ 或 http://mywebsite.com/ 访问应用程序时,我收到以下错误:
ERROR:Rocket.Errors.Port80:Socket in use by other process and it won't share
Apache 已经在端口 80 上运行。最终,我希望用户访问http://xxx.xx.xx.xx/ 或http://mywebsite.com/ 的应用程序。如何在我当前的配置中实现这一点,而不使用此处描述的一步生产部署:http://web2py.com/book/default/chapter/13#Apache-setup?
我对如何通过以下三种方式中的每一种都感兴趣:
1) 使用端口 80 上已经预装的 Apache 服务器。
2) 在80端口使用Web2py内置的Rocket服务器,从而调整系统,忽略预装的Apache服务器,打开80端口。
3) 在另一个端口上使用内置 Rocket 服务器,比如 8000,但这样做的方式是用户仍然可以通过访问 http://xxx.xx.xx.xx/ 或 http://mywebsite.com/ 访问该站点及其所有功能。这意味着他们不需要将 8000 附加到 url(如 http://xxx.xx.xx.xx/8000 或 http://mywebsite.com/8000)。
谢谢。
【问题讨论】: