LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-06-2013, 09:30 PM   #1
jbdkz
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Rep: Reputation: Disabled
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!
 
Old 01-07-2013, 01:07 AM   #2
lykwydchykyn
Member
 
Registered: Mar 2006
Location: Tennessee, USA
Distribution: Debian, Ubuntu
Posts: 135

Rep: Reputation: 36
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.
 
Old 01-07-2013, 04:16 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,947

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
What are the symptoms of 'non-working'? What is in /var/log/apache2/error_log?
 
Old 01-07-2013, 09:00 AM   #4
jbdkz
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
PHP/iptables problem

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
Attached Images
File Type: jpg HTTPDerror.JPG (86.7 KB, 15 views)
 
Old 01-07-2013, 09:05 AM   #5
jbdkz
LQ Newbie
 
Registered: Jan 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Output from iptables --list

Attached is the output from iptables --list
Attached Images
File Type: jpg iptables_list.JPG (42.5 KB, 14 views)
 
Old 01-07-2013, 10:56 AM   #6
lykwydchykyn
Member
 
Registered: Mar 2006
Location: Tennessee, USA
Distribution: Debian, Ubuntu
Posts: 135

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
re-use several objects between php pages htamayo Programming 1 04-22-2008 04:50 AM
PHP pages are displayed as blank pages Hirszu Linux - Software 6 03-03-2008 01:09 AM
installed php and apache yet my php pages dont load ?? jessica_lilly Linux - Software 1 11-13-2007 02:57 AM
Suse 9.3/apache2/php4 - Firefox tries to download index.php, other *php pages work stefanlasiewski Suse/Novell 1 01-18-2006 07:12 PM
[PHP] How do I view PHP pages?? vbp6us Linux - General 4 04-16-2003 07:29 PM


All times are GMT -5. The time now is 04:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration