Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

everyone. I am trying unsuccessfully to run Apache on my machine. I used the command line to find out all the applications that are using port 80 and I ended them, but Apache refuses to run on my server after that. I have a Ruby on Rails web service and mySQL server 5.5 installed on the same machine. Could that be the reason why Apache won't run on my machine?

share|improve this question
    
Probably not. What do your apache error logs say? –  calman Apr 11 '11 at 0:42
    
How are you running Rails? Passenger, Mongrel, CGI, FastCGI, mod_ruby? –  Andrew Apr 11 '11 at 0:56
    
Temporarily set apache to listen on a high port like 8080 or 7080. If it starts, stop it and set it to listen on 82. If is starts (you are starting it up as root when you're configured to listen on a port number below 1024?). If it starts while listening on 82 and it starts when running on 7080, then something is using port 80. Of course, the easiest way to tell if something is listening on port 80 is to telnet to it, type " GET / HTTP/1.1 " and press enter a couple of times. You'll probably see the server type in the response header. –  mahnsc Apr 11 '11 at 1:54
    
@mahnsc - how do I set apache to listen on another port? –  Engprof Apr 11 '11 at 2:31
    
Edit the httpd.conf. look for a "Listen 80" directive. Change 80 to 7080. Restart apache. Do you run apache as a user like www or do you run it using sudo? If you're running on a port >1024, then you don't need to use sudo to start it. –  mahnsc Apr 11 '11 at 2:44

1 Answer 1

Use netstat -a | find "80" to find out what app is binding to port 80. It's most likely a web server (e.g. IIS)

share|improve this answer
    
Thanks –  Engprof Apr 11 '11 at 4:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.