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..

link|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
feedback

3 Answers

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.

link|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
feedback

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.

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

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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