开发者

Apache only accessible from localhost but not via IP or Domain Name

开发者 https://www.devze.com 2023-02-18 16:47 出处:网络
So I was having problem setting up my Apache and I have it running now. If you want to see my httpd.conf file or some other info please look at Need help setting up Apache on CentOS 5.5 , getting 403

So I was having problem setting up my Apache and I have it running now.

If you want to see my httpd.conf file or some other info please look at Need help setting up Apache on CentOS 5.5 , getting 403

I can successfully run lynx localhost and see "It works!" however when I try to access the site via the domain name or IP address I do not get anything. Chrome says oops could not connect to blah blah.

Here is my iptables -L : https://gist.github.com/875450

Here is my iptables-save : https://gist.github.com/875472

So what am doing wrong that I开发者_如何学Python can see it locally but not via the IP?

Thanks


You have an issue with your iptables configuration. The first rule in the INPUT chain is:

-A INPUT -j RH-Firewall-1-INPUT

and all other rules in the chain are appended (-A) after it. But the last rule in the RH-Firewall-1-INPUT chain is:

-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

which rejects any connection that has not been accepted previously, including any HTTP connections.

You need to insert (-I) the HTTP/HTTPS rules to the INPUT chain instead of appending (-A) them, so that they are applied first.

0

精彩评论

暂无评论...
验证码 换一张
取 消