Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache: Connection refused on localhost and from network
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
geta
Apprentice
Apprentice


Joined: 10 May 2003
Posts: 153

PostPosted: Sat May 10, 2003 9:43 pm    Post subject: Apache: Connection refused on localhost and from network Reply with quote

Hello!

I've installed (emerged) the latest Apache release on my Gentoo PC. I'm having problems connecting to the webserver. This is my situation:
- Apache is up and running (checked witch "ps -aux")
- No error messages in error log file
- No firewall installed on Linux (neither iptables nor ipchains)
- I can't connect to the server locally nor from other PCs on the network.

I suppose the problem is TCP related. I've checked with ethereal and Linux replies with a "Zero Window TCP-Packet" to any SYN Packets sent to port 80 on my machine.
In those Zero Window Packets the flags ACK and RST are set.

Could anyone maybe give me a hint what the problem is? I've included the apache errorlog and the apache.conf file:

apache error log:
Quote:
[Sat May 10 22:20:16 2003] [notice] Apache/1.3.27 (Unix) (Gentoo/Linux) configured -- resuming normal operations
[Sat May 10 22:20:16 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat May 10 22:20:16 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)


apache.conf:
Quote:
ServerType standalone
ServerRoot /etc/apache
#ServerName localhost
#LockFile /etc/httpd/httpd.lock
PidFile /var/run/apache.pid
ScoreBoardFile /etc/apache/apache.scoreboard
ErrorLog logs/error_log
LogLevel warn
ResourceConfig /dev/null
AccessConfig conf/commonapache.conf
DocumentRoot /home/httpd/htdocs


Thanks for your help
Back to top
View user's profile Send private message
snkmoorthy
Guru
Guru


Joined: 19 Nov 2002
Posts: 376

PostPosted: Sat May 10, 2003 10:32 pm    Post subject: Reply with quote

do you local started?, do you have the machine name set to localhost or something else? the 127.0.0.1 thinge.
Back to top
View user's profile Send private message
geta
Apprentice
Apprentice


Joined: 10 May 2003
Posts: 153

PostPosted: Sun May 11, 2003 8:54 am    Post subject: Reply with quote

the loopback device is started and running.
/etc/hostname is set to "localhost" and /etc/hosts has got the entry "127.0.0.1 localhost"

what do you mean by:

snkmoorthy wrote:
do you local started?


Cheers
geta
Back to top
View user's profile Send private message
snkmoorthy
Guru
Guru


Joined: 19 Nov 2002
Posts: 376

PostPosted: Sun May 11, 2003 2:30 pm    Post subject: Reply with quote

still getting english lessons :roll: - the question should have read "do you have local started" - the lo interface - looks like you have. so a quick run of nmap will tell you if port 80 is open.

I'm pretty sure it is your httpd.conf that is to blame. does it matter that you have commented out the ServerName localhost line in the config?
Back to top
View user's profile Send private message
geta
Apprentice
Apprentice


Joined: 10 May 2003
Posts: 153

PostPosted: Sun May 11, 2003 4:09 pm    Post subject: Reply with quote

thanks for helping. i have found out what the problem was:

in apache.conf i had misconfigured something:

instead of
Quote:
Listen 80


i wrote
Quote:
Listen 127.0.0.1


which is bullocks. A service can only listen on a certain port and not on any IP address it wants to. :oops:

It is now running smoothly.
btw: nmap is a very handy tool.

thanks for your help, snkmoorthy !!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum