mirror of https://github.com/Aidaho12/haproxy-wi
Create server.py
parent
e2ec075c7b
commit
17f98f4501
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env python3
|
||||
import os, sys
|
||||
|
||||
from http.server import HTTPServer, CGIHTTPRequestHandler
|
||||
|
||||
sys.stderr = open('/opt/haproxy/log/haproxy-monitor.log', 'w')
|
||||
webdir = "/opt/haproxy"
|
||||
os.chdir(webdir)
|
||||
server_address = ("", 8000)
|
||||
httpd = HTTPServer(server_address, CGIHTTPRequestHandler)
|
||||
httpd.serve_forever()
|
Loading…
Reference in New Issue