I have managed to set up bitcoind, connect to its JSON/RPC API and run the getinfo command.
I followed exactly the same steps and configuration for litecoind (bitcoin.conf and litecoin.conf contain exactly the same settings) and set my client to connect to litecoind but I keep on hitting on a HTTP 504 error.
Both bitcoind instances are in testnet mode and I succesfully connect to port 18332 for bitcoind and also connect to port 19333 for litecoind but this is as far as it gets, I can't seem to be able to get any reply from litecoind.
This is my configuration for both .conf files:
rpcuser = xxxxxxxxxxxxxxxxx rpcpassword = xxxxxxxxxxxxxxxxx testnet=1 daemon=1 rpcallowip=*