Tôi có đoạn code sau đây là máy chủ python của tôi:Cách đặt DocumentRoot trong khi sử dụng HTTPServer của 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()
Làm thế nào để bạn thiết lập các DocumentRoot mà máy chủ đang phục vụ các trang từ.
Cảm ơn bạn đã nhanh chóng – chutsu