It needs to be "W:127.0.0.1,W:IP" (without the quotes)
Where IP is your IP address looking at the miner.
You can't get rid of W:127.0.0.1 otherwise, as you've seen, the miner will keep restarting coz it can't talk to my cgminer API.
i.e. both the miner linux and AM needs to be able to talk to the API, removing the W:127.0.0.1 is why it keeps restarting.
Some light reading
https://github.com/kanoi/cgminer/blob/master/API-READMEThanx!!! I'm gonna give it a try. Wish I would have asked 2 weeks ago. It slipped my memory, that, you're the one that wrote ALOT of API coding. Maybe you should add it to your signature, you deserve the credit!!!