1

I should have 3 web sites on one apache2 (up-to-date Ubuntu).

Each site has its own file in "sites-enabled". Each has its own IP.

Apache2 seems to be running fine: /var/log/apache2/error.log only says: [Fri Nov 08 12:30:12 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.6-1ubuntu1.4 configured -- resuming normal operations

The DNS files seem OK. But when I point a browser to the second and third site (to their domain names or to their IP adresses), it just hangs until timeout.

What should I check next, please?

----------------------- ANSWER 1:

ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:93:68:c0 brd ff:ff:ff:ff:ff:ff
    inet 92.243.20.169/22 brd 92.243.23.255 scope global eth0
    inet6 2001:4b98:dc0:45:216:3eff:fe93:68c0/64 scope global dynamic 
       valid_lft 2591871sec preferred_lft 604671sec
    inet6 fe80::216:3eff:fe93:68c0/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:84:91:0a brd ff:ff:ff:ff:ff:ff
    inet 92.243.21.141/22 brd 92.243.23.255 scope global eth1
    inet6 2001:4b98:dc0:45:216:3eff:fe84:910a/64 scope global dynamic 
       valid_lft 2591871sec preferred_lft 604671sec
    inet6 fe80::216:3eff:fe84:910a/64 scope link 
       valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:1f:2d:85 brd ff:ff:ff:ff:ff:ff
    inet 92.243.4.114/21 brd 92.243.7.255 scope global eth2
    inet6 2001:4b98:dc0:41:216:3eff:fe1f:2d85/64 scope global dynamic 
       valid_lft 2591952sec preferred_lft 604752sec
    inet6 fe80::216:3eff:fe1f:2d85/64 scope link 
       valid_lft forever preferred_lft forever

ifconfig

eth0      Link encap:Ethernet  HWaddr 00:16:3e:93:68:c0  
          inet addr:92.243.20.169  Bcast:92.243.23.255  Mask:255.255.252.0
          inet6 addr: 2001:4b98:dc0:45:216:3eff:fe93:68c0/64 Scope:Global
          inet6 addr: fe80::216:3eff:fe93:68c0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9550641 errors:0 dropped:3 overruns:0 frame:0
          TX packets:3749560 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:953636357 (953.6 MB)  TX bytes:6983319124 (6.9 GB)
          Interrupt:27 

eth1      Link encap:Ethernet  HWaddr 00:16:3e:84:91:0a  
          inet addr:92.243.21.141  Bcast:92.243.23.255  Mask:255.255.252.0
          inet6 addr: 2001:4b98:dc0:45:216:3eff:fe84:910a/64 Scope:Global
          inet6 addr: fe80::216:3eff:fe84:910a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5797827 errors:0 dropped:3 overruns:0 frame:0
          TX packets:34854 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:607191525 (607.1 MB)  TX bytes:1464788 (1.4 MB)
          Interrupt:28 

eth2      Link encap:Ethernet  HWaddr 00:16:3e:1f:2d:85  
          inet addr:92.243.4.114  Bcast:92.243.7.255  Mask:255.255.248.0
          inet6 addr: 2001:4b98:dc0:41:216:3eff:fe1f:2d85/64 Scope:Global
          inet6 addr: fe80::216:3eff:fe1f:2d85/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9231950 errors:0 dropped:2 overruns:0 frame:0
          TX packets:29473 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:914989353 (914.9 MB)  TX bytes:1349244 (1.3 MB)
          Interrupt:29 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:11570 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11570 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1135320 (1.1 MB)  TX bytes:1135320 (1.1 MB)

I don't understand most of that, but I can see the IPs: 92.243.20.169, 92.243.21.141 and 92.243.4.114, which are as they should be. I don't know if it is normal that the Bcast and Mask are different. The reports about the packets also look OK to me.

-------------------------- ANSWER 2

netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:mysql                 *:*                     LISTEN     
tcp        0      0 *:gandi-agent           *:*                     LISTEN     
tcp        0      0 *:ftp                   *:*                     LISTEN     
tcp        0      0 *:ssh                   *:*                     LISTEN     
tcp        0    368 Charlotte:ssh           reverse-27.fdn.fr:37999 ESTABLISHED
tcp6       0      0 [::]:http               [::]:*                  LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61519 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61352 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61442 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61209 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61550 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61421 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61579 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61606 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61386 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61469 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61275 TIME_WAIT  
tcp6       0      0 Charlotte:http          ks4000493.ip-198-:61247 TIME_WAIT  
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  3      [ ]         DGRAM                    2346     /dev/log
unix  2      [ ACC ]     STREAM     LISTENING     229      @/com/ubuntu/upstart
unix  2      [ ACC ]     STREAM     LISTENING     3598978  /var/run/mysqld/mysqld.sock
unix  2      [ ACC ]     SEQPACKET  LISTENING     430      /run/udev/control
unix  3      [ ]         STREAM     CONNECTED     3597550  
unix  3      [ ]         STREAM     CONNECTED     3597549  
unix  2      [ ]         DGRAM                    3597541  
unix  3      [ ]         STREAM     CONNECTED     709      @/com/ubuntu/upstart
unix  3      [ ]         STREAM     CONNECTED     706      
unix  3      [ ]         DGRAM                    438      
unix  3      [ ]         DGRAM                    437      
unix  3      [ ]         STREAM     CONNECTED     393      @/com/ubuntu/upstart
unix  3      [ ]         STREAM     CONNECTED     390      

This I have no idea what it all means.

---------------------- ANSWER 3

ping 92.243.20.169
PING 92.243.20.169 (92.243.20.169) 56(84) bytes of data.
64 bytes from 92.243.20.169: icmp_req=1 ttl=59 time=57.3 ms
64 bytes from 92.243.20.169: icmp_req=2 ttl=59 time=45.7 ms
64 bytes from 92.243.20.169: icmp_req=3 ttl=59 time=43.9 ms
64 bytes from 92.243.20.169: icmp_req=4 ttl=59 time=44.9 ms
^C
--- 92.243.20.169 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 43.968/48.000/57.368/5.449 ms

ping 92.243.21.141
PING 92.243.21.141 (92.243.21.141) 56(84) bytes of data.

--- 92.243.21.141 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6047ms

ping 92.243.21.141
PING 92.243.21.141 (92.243.21.141) 56(84) bytes of data.
--- 92.243.21.141 ping statistics ---
13 packets transmitted, 0 received, 100% packet loss, time 12000ms

-------------------@MadHatter

By "the DNS files seem OK", I mean I did not modify them and no program modified them either. They used to function before, so I guess they are OK. Would you like me to post a copy of them?

2
  • Thsi question is very difficult to answer as-written. What do you mean by "the DNS files seem OK"? What happens if you try to access the sites from the shell, perhaps using wget, or test name resolution via dig, and connectivity via telnet? In short, don't tell us what you've done, show us what you've done - there's much more chance of working out what's going wrong that way.
    – MadHatter
    Nov 8, 2013 at 11:46
  • Is apache listening on all the addresses? netstat -a will tell you. Nov 8, 2013 at 11:54

1 Answer 1

0

If you've got multiple IPs, you'll need multiple interfaces brought up. Can you ping the IPs? it may not even be an Apache problem. Type "ip addr" or "ifconfig" and see if you see them listed.

If that's all fine, make sure your virtual hosts are set up to listen on each IP respectively.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .