- openssl s_server -accept 443 -www
- python -m SimpleHTTPServer
python 要搭配 https 其實也不麻煩,執行一個固定內容的檔案即可:
- import BaseHTTPServer, SimpleHTTPServer
- import ssl
- httpd = BaseHTTPServer.HTTPServer(('', 443), SimpleHTTPServer.SimpleHTTPRequestHandler)
- httpd.socket = ssl.wrap_socket (httpd.socket, certfile='./server.pem', keyfile='./server.key', server_side=True)
- httpd.serve_forever()
沒有留言:
張貼留言