我有以下代码作为我的 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。