Saturday, March 2, 2013

PHP files not working after LAMP (linux, PHP, Mysql, Installation) Add entries in IPtable for port 80 and 443

After successfully installing PHP, Mysql, Apache if still you are not able to execute php files. You need to check firewall settings on server. Check entries in iptable and allow access to port 80 and 443

open /etc/sysconfig/iptables

Add below lines :
# Allow traffic on port 80 (HTTP traffic)
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
#Allow traffic on 443 (HTTPS traffic)
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT


 Save and restart apache.

Try to run now your php files in browser it will work.

No comments:

Post a Comment