我有一个Ubuntu的10.4安装与Apache2默认运行在端口80.我想gae响应该地址,而不是Apache。 我已经改变了Apache的conf文件,以便使用另一个端口,但80端口仍然绑定到它。 尽pipe如果我停止Apache /etc/init.d/apache2停止仍然从端口得到响应。 我错过了什么吗?
查找谁使用80端口
netstat -anltp | grep \:80
杀了它:
kill `netstat -anltp | grep \:80 | sed -e 's/.*LISTEN[ ]*\([0-9]*\).*/\1/'`
停止Apache,如果你仍然希望它运行在80:
sudo apache2ctl stop
然后使用python 2.5作为sudo运行GAE:
cd <google_app_directory> sudo python2.5 dev_appserver.py -a 127.0.0.1 -p 80 /home/<your_username>/<app_directory>
这对我来说很好,因为我经常在80上使用apache,所以我可以根据需要在两者之间切换。