B0b Posted January 21, 2010 Share Posted January 21, 2010 Hi guys, I've read all tutorials I could find but can't get Apache to work on my freshly formatted CentOS 5.3 server (it does work with Debian Lenny however). yum install httpd chkconfig --levels 235 httpd on /etc/init.d/httpd start After succesfully running these 3 lines, Apache is installed and viewable via FTP, but I can't access anything via my browser (using server IP). I assume HTTP traffic is blocked by some sort of firewall? I would I go about removing this? Thanks so much! Quote Link to comment https://forums.phpfreaks.com/topic/189368-problem-installing-apache/ Share on other sites More sharing options...
steviewdr Posted January 22, 2010 Share Posted January 22, 2010 Edit: /etc/sysconfig/iptables and add in a line for port 80, tcp. Quote Link to comment https://forums.phpfreaks.com/topic/189368-problem-installing-apache/#findComment-999807 Share on other sites More sharing options...
B0b Posted January 30, 2010 Author Share Posted January 30, 2010 Hi, My apologizes for bumping this, but I couldn't try earlier. Thank you very much for your help, but it doesn't work... I added the following at the begining of iptables: -A INPUT -p tcp -m tcp --sport 80 -j ACCEPT -A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m tcp --sport 443 -j ACCEPT -A OUTPUT -p tcp -m tcp --dport 443 -j ACCEPT It is of an extreme importance... I'll gladly donate once again to contribute to the forum if you guys can help me find the problem This is the server: http://95.130.9.87 Quote Link to comment https://forums.phpfreaks.com/topic/189368-problem-installing-apache/#findComment-1004073 Share on other sites More sharing options...
steviewdr Posted January 30, 2010 Share Posted January 30, 2010 As root or sudo, run: netstat -tap (paste the results here) iptables -L (paste the results here) Quote Link to comment https://forums.phpfreaks.com/topic/189368-problem-installing-apache/#findComment-1004234 Share on other sites More sharing options...
B0b Posted January 30, 2010 Author Share Posted January 30, 2010 Thanks... All this is beyond my PHPer knowledge. Connexions Internet actives (serveurs et établies) -> In French: Internet connections activity (servers and ?) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:entomb *:* LISTEN 2289/rpc.statd tcp 0 0 *:sunrpc *:* LISTEN 2243/portmap tcp 0 0 localhost.localdomain:ipp *:* LISTEN 2577/cupsd tcp 0 0 localhost.localdomain:smtp *:* LISTEN 2601/sendmail: acce tcp 0 0 *:http *:* LISTEN 2926/httpd tcp 0 0 *:ssh *:* LISTEN 2562/sshd tcp 0 856 digi00283.digicube.fr:ssh ::ffff:MyIpAndPort ESTABLISHED 2632/0 Chain INPUT (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain RH-Firewall-1-INPUT (2 references) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT icmp -- anywhere anywhere icmp any ACCEPT esp -- anywhere anywhere ACCEPT ah -- anywhere anywhere ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns ACCEPT udp -- anywhere anywhere udp dpt:ipp ACCEPT tcp -- anywhere anywhere tcp dpt:ipp ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Quote Link to comment https://forums.phpfreaks.com/topic/189368-problem-installing-apache/#findComment-1004257 Share on other sites More sharing options...
steviewdr Posted January 31, 2010 Share Posted January 31, 2010 So the firewall is still blocking http traffic on you. You said, you added: -A INPUT -p tcp -m tcp --sport 80 -j ACCEPT-A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT-A INPUT -p tcp -m tcp --sport 443 -j ACCEPT-A OUTPUT -p tcp -m tcp --dport 443 -j ACCEPT. Did you reboot the server after doing this? If not, do so, and the above rules should be taken into account. You can also try going: yum install system-config-securitylevel-tui system-config-securitylevel-tui Then you should have a menu to allow you access to open what ports you require. You can always do it manually by going: iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT ^This should definately work and take immediate effect. See: http://wiki.kartbuilding.net/index.php/Iptables_Firewall Quote Link to comment https://forums.phpfreaks.com/topic/189368-problem-installing-apache/#findComment-1004657 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.