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.

I have just installed nginx and apache on a dedicated server with redhat, how ever when I go to http://65.111.167.39 I get a connection failure. I tried changing nginx port con conf, but it didn't work neither.

Both services are running:

/etc/init.d/httpd status httpd (pid 22498) is running...

/etc/init.d/nginx status nginx (pid 22534) is running...

Some advices? By the way I have no experience at all, so anything could be missing..

share|improve this question
1  
Define "doesn't show anything"? A blank page? A 404 page? A connection failure? –  ceejayoz Feb 18 '10 at 21:21
    
ceejayoz I have edited the post. Thankyou. –  quarry32 Feb 18 '10 at 22:36
    
does netstat or lsof -i show you the process listening on port 80 ? –  micah Feb 19 '10 at 4:13
add comment

3 Answers 3

up vote 2 down vote accepted

You may want to check if the default firewall is running:

iptables -nL

Sounds simple but I've seen many people run in circles before remembering to check this.

Run a netstat so you can be sure the service is actually bound to the port.

Note that you cannot bind both nginx and apache to the same port.

share|improve this answer
    
using "service iptables stop" worked both ports (nginx and apache) now I'll read about iptables to learn how to use them correctly. Thankyou. –  quarry32 Feb 19 '10 at 17:30
add comment

Also check /etc/hosts.allow and /etc/hosts.deny

Try and connect from the redhat box http://127.0.0.1. If you only have a shell you can use lynx or links.

share|improve this answer
    
this also helped me, 127.0.0.1 showed the page correctly. –  quarry32 Feb 20 '10 at 15:33
add comment

Please, show the output of netstat -ntlp.Also I'd like to see your nginx.conf and httpd.conf

share|improve this answer
add comment

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.