Как установить DocumentRoot при использовании Python HTTPServer?

У меня есть следующий код в качестве моего сервера Python:

#!/usr/bin/python3
from http.server import HTTPServer, CGIHTTPRequestHandler

port = 8080
host_name = "localhost"
httpd = HTTPServer((host_name, port), CGIHTTPRequestHandler)
print("server started, to quit press <ctrl-c>")
httpd.serve_forever()

Как установить DocumentRoot, из которого сервер обслуживает страницы.

6
задан chutsu 10 July 2012 в 18:28
поделиться