0

Basic question. I have memcached installed on my EC2 instance.

It has an elastic IP address of, say, 101.45.23.18, and ifconfig shows

eth0      Link encap:Ethernet  HWaddr 12:31:3b:0e:3a:8f  
          inet addr:10.241.13.121  Bcast:10.241.13.255  Mask:255.255.255.0
          inet6 addr: fe80::1031:3bff:fe0e:3a8f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2654 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1717 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1806365 (1.8 MB)  TX bytes:206184 (206.1 KB)
          Interrupt:26 

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

How do I start memcached to listen on the external IP address rather than the internal one?

4

1 回答 1

1

Solved it. Supereasy - you can't bind directly to the elastic IP address, but you can bind to 0.0.0.0 which solves the problem.

于 2012-04-13T08:12:59.437 回答