I have an ubuntu 10.4 installation with apache2 running by default in port 80. I want gae to respond to that address instead of apache. I have changed the conf files for apache in order to use another port but still the 80 port gets bind to it. Despite if I stop apache /etc/init.d/apache2 stop still getting responses from the port. Am I missing something?
2 Answers
Find who use 80 port
netstat -anltp | grep \:80
Kill it:
kill `netstat -anltp | grep \:80 | sed -e 's/.*LISTEN[ ]*\([0-9]*\).*/\1/'`
-
bash: kill: 69.59.196.211:80: arguments must be process or job IDs, I get several errors like that. I don't like the idea of shutting down everything though :) Oct 3, 2010 at 11:25
-
-
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - I guess this is the one that I should kill but there is not pid only a dash. I want to bind my localhost address is this going to respond to 127.0.0.1? Oct 3, 2010 at 13:07
-
Stop Apache if you still want it to run on 80:
sudo apache2ctl stop
Then run GAE as sudo using python 2.5:
cd <google_app_directory>
sudo python2.5 dev_appserver.py -a 127.0.0.1 -p 80 /home/<your_username>/<app_directory>
This works great for me as i often use apache on 80 as well so i can switch between the two when required.
Listen 80
? Or have you just changedListen 80
toListen 8500
? If you have noListen 80
in your/etc/apache2/ports.conf
then some other app is listening on that port.