File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -498,15 +498,21 @@ following command runs an HTTP/1.1 conformant server::
498498
499499The server can also support TLS encryption. The options ``--tls-cert `` and
500500``--tls-key `` allow specifying a TLS certificate chain and private key for
501- secure HTTPS connections. Use ``--tls-password-file `` option if private keys are
502- passphrase-protected. For example, the following command runs the server with
503- TLS enabled::
501+ secure HTTPS connections. For example, the following command runs the server with
502+ TLS enabled:
504503
505- python -m http.server --tls-cert fullchain.pem
504+ .. code-block :: bash
506505
507- Or if a separate file with private key passphrase-protected::
506+ python -m http.server --tls-cert fullchain.pem
508507
509- python -m http.server --tls-cert cert.pem --tls-key key.pem --tls-password-file password.txt
508+ Use ``--tls-password-file `` option if private keys are password-protected:
509+
510+ .. code-block ::
511+
512+ python -m http.server \
513+ --tls-cert cert.pem \
514+ --tls-key key.pem \
515+ --tls-password-file password.txt
510516
511517 .. versionchanged :: next
512518 Added the ``--tls-cert ``, ``--tls-key `` and ``--tls-password-file `` options.
You can’t perform that action at this time.
0 commit comments