我正在寻找允许使用 ssl 启动 php 文件的服务器。我尝试过例如 python 简单服务器:
import BaseHTTPServer, SimpleHTTPServer
import ssl
httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, keyfile='privkeyA.pem', certfile='certA.crt', server_side=True)
print("Server is working!")
httpd.serve_forever()
证书和密钥运行良好,但我只能启动 html 文件,因为该服务器不支持 php 文件。
使用可以使用PHP 内置服务器 http://php.net/manual/en/features.commandline.webserver.php + ngrok https://ngrok.com用于获取 Https+SSL
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)