How do I do SSL on
How do I do it on live server?
Agreed with @Jawa, but for testing SSL on localhost, I would suggest you to look this post
Assuming you are referring to SSL with HTTP, for testing purposes you need to create a self-signed SSL certificate.
However, you probably don't want your users to get a warning for self-signed cert, so for production environment you might want to get a real, official CA signed certificate.