LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-13-2007, 09:35 AM   #1
JackyRang
LQ Newbie
 
Registered: Dec 2007
Location: China
Posts: 4

Rep: Reputation: 0
Unhappy apache2 running but can't visit anywhere



I am try to run two web applications on a Linux Server,one is jsp,another is php.

So I installed tomcat5(use:80) and apache2(:use 8081) on the linux, without doing any things to combine them.
(I just want to them do their own job)

Now,the problem is : tomcat works well,but I can't even vist apache default page by browser,although apache start OK ,no error report,the 8081 port is listening(use netstat -an |grep 8081),the process of httpd is running.
Quote:
tcp 0 0 :::8081 :::* LISTEN 9196/httpd
Can any body tell me the potential reasons?

ps:I install apache on another linux mathine ,same tar.gz ,same change to /apache/conf/httpd.cnf .
And it works well.

I am a Newbie for linux httpd,so ,any advise is helpful .Thanks anyway.

Last edited by JackyRang; 12-13-2007 at 09:53 AM.
 
Old 12-13-2007, 09:43 AM   #2
JackyRang
LQ Newbie
 
Registered: Dec 2007
Location: China
Posts: 4

Original Poster
Rep: Reputation: 0
this is my service iptables status

Quote:
琛ㄦ牸锛歠ilter
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
ACCEPT esp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT ah -- 0.0.0.0/0 0.0.0.0/0
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTAB LISHED
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:2 2
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:8 0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:2 1
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:2 5
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-ho st-prohibited
 
Old 12-13-2007, 09:44 AM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Appears to be a rule to accept traffic on port 80.. so I would think you need a rule to accept traffic on port 8081


ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:80

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:8081

Last edited by farslayer; 12-13-2007 at 09:47 AM.
 
Old 12-13-2007, 09:56 AM   #4
JackyRang
LQ Newbie
 
Registered: Dec 2007
Location: China
Posts: 4

Original Poster
Rep: Reputation: 0
sorry did u show the commond ?
i tried this
Quote:
[root@localhost ~]# ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:8081
-bash: ACCEPT: command not found
ps:sorry it's 24:00 in china I have to go .Good noon ,everyone.

Last edited by JackyRang; 12-13-2007 at 10:00 AM.
 
Old 12-13-2007, 10:48 AM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
I'm no expert but I think it would be something like...

iptables -I RH-Firewall-1-INPUT 10 -p TCP -s 0/0 --destination-port 8081 -j ACCEPT


I'm sure someone will correct me if this is wrong... (please do)
 
Old 12-13-2007, 08:09 PM   #6
JackyRang
LQ Newbie
 
Registered: Dec 2007
Location: China
Posts: 4

Original Poster
Rep: Reputation: 0
thanks very much!! Farslayer ,it works.
 
  


Reply

Tags
apache2



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
cgi is not running through Apache2 ----- help xudonw1 Linux - Server 2 04-07-2007 05:42 AM
Can ping websites, can visit websites with ip address, cannot visit with Web address TheGeneralsLounge Linux - Networking 2 03-29-2007 02:07 AM
Apache2 does not appear to be running tranzy Ubuntu 2 03-13-2007 12:25 PM
apache2 not running mikolaj Slackware 10 09-26-2004 12:00 PM
Apache2 running but not? Relja Linux - Networking 6 03-22-2004 04:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:45 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
Open Source Consulting | Domain Registration