【发布时间】:2020-12-18 14:20:00
【问题描述】:
我目前正在尝试在 Windows 10 的虚拟机 (ubuntu) 上为 python 设置 apache。尝试在浏览器中执行脚本时遇到问题。有人可以帮忙吗?
这是我试图执行的脚本:
#!/usr/bin/python3
def application(environ, start_response):
status='200 OK'
html = '<html>\n'
'<body>\n'
'<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">\n'
'Welcome to mod_wgsi Test Page\n'
'</div>\n'
'</body>\n'
'</html>\n'
response_header = [('Content-type','text/html')]
start_response (status, response_header)
return [html]
提前致谢! :)
【问题讨论】:
标签: python ubuntu virtual-machine