Skip to content

Instantly share code, notes, and snippets.

@rogeriopradoj
Forked from pitpit/howto.md
Created March 6, 2017 10:42
Show Gist options
  • Save rogeriopradoj/fb8d1f07be18ed8e71cc0d8c11e0ec28 to your computer and use it in GitHub Desktop.
Save rogeriopradoj/fb8d1f07be18ed8e71cc0d8c11e0ec28 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