Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/189368-problem-installing-apache/
Share on other sites

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

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

 

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.