Skip to content

Commit efd44a4

Browse files
donBarbospicnixz
andauthored
Update Doc/library/http.server.rst
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 196e71d commit efd44a4

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Doc/library/http.server.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -498,15 +498,21 @@ following command runs an HTTP/1.1 conformant server::
498498

499499
The 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.

0 commit comments

Comments
 (0)