





















1.安装 Nginx
2. 修改nginx配置文件
cd /etc/nginx/ mv nginx.conf nginx.conf.swf mv nginx.conf.default nginx.conf vi nginx.conf
upstream tornados{ server 127.0.0.1:8888; } proxy_next_upstream error; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { #root html; #index index.html index.htm; proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://tornados; }
3.启动tornado
/root/anaconda3/envs/demo/bin/python /root/python_codes/tornadodemo/main.py
4.启动Nginx
systemctl start nginx.service
systemctl stop nginx.service
systemctl restart nginx.service
systemctl enable nginx.service
5.访问网址
enjoy :)...
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。