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

I setup a fresh CentOS 5 install, compile nginx from scratch and am using thin as the rails server.

If I visit the ip adress on the LAN: (for example) 1.2.3.4 I get the website not found error.

However, I can ssh into the machine. If I use links to visit the ip address, I get the landing page.

Any suggestions?

Thanks

EDIT

I ran system-config-securitylevel and then was able to change the security settings to allow incoming connections.

share|improve this question

migrated from superuser.com Mar 2 '11 at 9:11

This question came from our site for computer enthusiasts and power users.

1 Answer 1

Your firewall is probably blocking it. To open access for port 80 to all traffic, run (as root):

iptables -A RH-Firewall-1-INPUT -p tcp --dport 80 -j ACCEPT

To only open traffic for your LAN (or any arbitrary block of IP addresses), add a -s argument with the IP block in CIDR notation. For instance, to open Port 80 for 192.168.0.0-192.168.255.255:

iptables -A RH-Firewall-1-INPUT -s 192.168.0.0/24 -p tcp --dport 80 -j ACCEPT

To make that change persist across reboots, add all of the arguments (e.g. everything except iptables) to /etc/sysconfig/iptables, just before the line that begins -A RH-Firewall-1-INPUT -j REJECT.

share|improve this answer
    
tried that, but no luck. thanks anyways. –  cbrulak Mar 2 '11 at 21:08

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.