Skip to content

Instantly share code, notes, and snippets.

@pitpit
Created April 1, 2015 09:22
Show Gist options
  • Save pitpit/c80d2d6135d5f26350cf to your computer and use it in GitHub Desktop.
Save pitpit/c80d2d6135d5f26350cf to your computer and use it in GitHub Desktop.
HTTPS avec le serveur de dev PHP (en utilisant stunnel)

Installer puis lancer un serveur de dev en HTTPS grâce à stunnel

brew install stunnel
cd /usr/local/etc/stunnel
openssl genrsa -out key.pem 2048
openssl req -new -x509 -key key.pem -out cert.pem -days 1095
cat key.pem cert.pem >> stunnel.pem

chmod 600 stunnel.pem

php -S 127.0.0.1:8000 -t web/ web/index_dev.php & stunnel3 -d 8443 -r 8000 -v0 -p /usr/local/etc/stunnel/stunnel.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment