我在生产环境上部署了一个超集,并且可以在https://superset.mydomain.com:8088进行访问,这意味着它在默认的内部服务器上运行。我的超集安装在Python virtualenv上。
我的问题是,如何在Apache Web服务器上运行超集?需要安装哪些库?
我推荐了http://flask.pocoo.org/docs/1.0/deploying/mod_wsgi/。
apt-get install libapache2-mod-wsgi -应该安装在我的虚拟环境中吗?在那种情况下不是 sudo pip libapache2-mod-wsgi ?
在哪里创建 .wsgi 文件以及在其中写什么。
我希望超集可以在我的443端口上运行,并且可以在https://superset.mydomain.com上进行访问。
根据我对Google的了解, .wsgi 文件格式应为 app_name.wsgi ,因此我的文件名为 < b> superset.wsgi 。
文件路径: venv / lib / python3.6 / site-packages / superset / superset.wsgi。
现在我的 superset.wsgi 文件的内容是:
activate_this = '/home/aissel/supersetvenv/bin/activate_this.py'
with open(activate_this) as file_:
exec(file_.read(), dict(__file__=activate_this))
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!\n'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
还是我没有得到预期的结果。