Cryptography basics
Certificates
Transport Layer Security
What you need:
mod_SSL OpenSSL toolkit PHP --with-openssl