Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just installed nginx and apache on a dedicated server with redhat, how ever when I go to 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
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
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

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

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

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

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

share|improve this answer

Your Answer


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.