Results 1 to 2 of 2
Okay - I've tried my local LUG and haven't found the answer - I've look on the internet all morning and nothing seems to fit my specific issue.
Here goes ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-21-2007 #1Just Joined!
- Join Date
- Jun 2007
- Posts
- 2
Strange Apache Problem
Okay - I've tried my local LUG and haven't found the answer - I've look on the internet all morning and nothing seems to fit my specific issue.
Here goes - I have a server running FC6 (due to a software requirement) that has a mailserver package installed.
I wanted to host another server on this same machine. Now the mailserver doesn't use apache or anything but I was told I can set it to listen to it's own IP so here is where I am at.
Using Fedora's 'tools' I setup another IP on the same nic so now ifconfig shows:
[root@mercury /]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:72:0B
7:5A
inet addr:192.168.1.200 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::213:72ff:fe0b:d75a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36912 errors:0 dropped:0 overruns:0 frame:0
TX packets:32560 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29901490 (28.5 MiB) TX bytes:9428176 (8.9 MiB)
Interrupt:17
eth0:0 Link encap:Ethernet HWaddr 00:13:72:0B
7:5A
inet addr:192.168.1.205 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:17
netstat -plant shows:
[root@mercury /]# netstat -plant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2297/hpiod
tcp 0 0 192.168.1.200:993 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:995 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:389 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 0.0.0.0:998 0.0.0.0:* LISTEN 2088/rpc.statd
tcp 0 0 192.168.1.200:110 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:143 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2054/portmap
tcp 0 0 192.168.1.200:80 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:465 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 0.0.0.0:44337 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:563 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:119 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:25 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:443 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 192.168.1.200:636 0.0.0.0:* LISTEN 3946/mailserver
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2302/python
tcp 0 0 192.168.1.200:443 192.168.0.189:4181 ESTABLISHED 3946/mailserver
tcp 0 0 192.168.1.200:443 192.168.0.189:4180 ESTABLISHED 3946/mailserver
tcp 0 0 192.168.1.200:25 207.179.93.134:54419 TIME_WAIT -
tcp 1 0 192.168.1.200:40411 209.132.176.120:80 CLOSE_WAIT 2473/python
tcp 0 0 192.168.1.200:443 192.168.0.168:1413 ESTABLISHED 3946/mailserver
tcp 0 0 192.168.1.200:443 192.168.0.168:1414 ESTABLISHED 3946/mailserver
tcp 0 0 :::22 :::* LISTEN 2328/sshd
tcp 0 0 ::1:631 :::* LISTEN 2314/cupsd
tcp 0 0 ::ffff:192.168.1.200:22 ::ffff:192.168.0.250:2208 ESTABLISHED 2760/1
[root@mercury /]#
So the mailserver is listening on the correct IP. However, when I try to start httpd I get this error:
[root@mercury /]# httpd
(9
Address already in use: make_sock: could not bind to address 192.168.1.205:80
no listening sockets available, shutting down
Unable to open logs
[root@mercury /]#
I had to modify the /etc/httpd/conf/httpd.conf file so the listen specified 192.168.1.205:80 (the fedora utility creates a conf file in /etc/httpd/conf.d/) -- without that it kept saying something about 0.0.0.0:80 which was screwy because the /etc/httpd/conf.d/system-config-httpd.conf specified the correct IP.
Anyway - does ANYONE have ANY ideas?
nmap shows that 192.168.1.200 is open and listening and 192.168.1.205 isn't
Please help if you can
Thanks
Benjamin
- 06-21-2007 #2Just Joined!
- Join Date
- Jun 2007
- Posts
- 2
Well - I went into the /etc/httpd/conf/httpd.conf file and removed the line I changed. Originally it was Listen *:80, which gave an error about 0.0.0.0:80 (even though the Fedora System Generated file /etc/httpd/conf.d/system-config-httpd.conf specified Listen 192.168.1.205:80) so I changed it to Listen 192.168.1.208:80 in that file (httpd.conf)
I just commented that out and it seems to have started fine and the test page is up. My only question is WHY?
Guessing got it working but I really want to understand what the problem was. Is it that the IP is mentioned in two files so it was trying to 'double allocate'??


Reply With Quote
