openSSL not working with PHP built-in webserver

后端 未结 2 962
情歌与酒
情歌与酒 2020-12-08 01:35

OS: Ubuntu 12.04 64-bit

PHP version: 5.4.6-2~precise+1

When I test an https page I am writing through the built-in webserve

2条回答
  •  不知归路
    2020-12-08 01:48

    See the manual section on the built-in webserver shim:
    http://php.net/manual/en/features.commandline.webserver.php

    It doesn't support SSL encryption. It's for plain HTTP requests. The openssl extension and function support is unrelated. It does not accept requests or send responses over the stream wrappers.

    If you want SSL to run over it, try a stunnel wrapper:

    php -S localhost:8000 &   
    stunnel3 -d 443 -r 8080  
    

    It's just for toying anyway.

提交回复
热议问题