LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   iptables and php pages (https://www.linuxquestions.org/questions/linux-newbie-8/iptables-and-php-pages-4175444418/)

jbdkz 01-06-2013 08:30 PM

iptables and php pages
 
I installed apache on RHE6.

I also did some research and entered the following iptables rule:

iptables -A INPUT -d <IP Address of RHE6 server> -p tcp --dport 80 -j ACCEPT

HTML pages work fine through the firewall and I can see the page from another computer.

I then proceeded to install php5 and created a sample php page in /var/www/html

The php page only works from a remote computer when iptables in disabled. As I recall php renders a page to html on the server side. What sort of rule would I need to have php work through the firewall?

Thanks!

lykwydchykyn 01-07-2013 12:07 AM

Well, in theory, none. Port 80 is port 80, no matter what is generating the output; but maybe there's some crazy rule in there. Maybe post the output of:
Code:

iptables -L
Which would show all the rules.

NevemTeve 01-07-2013 03:16 AM

What are the symptoms of 'non-working'? What is in /var/log/apache2/error_log?

jbdkz 01-07-2013 08:00 AM

PHP/iptables problem
 
1 Attachment(s)
When iptables is enabled, browser indicates that "This page cannot be displayed" for the php page.

Attached is the error log from /var/log/httpd/error_log

jbdkz 01-07-2013 08:05 AM

Output from iptables --list
 
1 Attachment(s)
Attached is the output from iptables --list

lykwydchykyn 01-07-2013 09:56 AM

Is this with the firewall disabled? Looks like it's just accepting everything.


All times are GMT -5. The time now is 01:36 AM.