无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Django在Ubuntu14.04的部署方法

2022-03-21 14:37 作者:Vecloud_  | 我要投稿

def application(env, start_response): ?start_response('200 OK', [('Content-Type','text/html')]) ?return ["Hello World"]uwsgi --http :8001 --plugin python --wsgi-file test.pypython manage.py runserver 0.0.0.0:8002uwsgi --http:8001 --plugin python --module mysite.wsgi# mysite_uwsgi.ini file ?[uwsgi] ?socket = 127.0.0.1:3400 ?# Django-related settings ?# the django project directory (full path) ?chdir ?????= /home/ubuntu/mysite ?# Django's wsgi file ?module ????= mysite.wsgi ?# process-related settings ?# master ?master ????= true ?# maximum number of worker processes ?processes ???= 2 ?threads = 2 ?max-requests = 6000 ?# ... with appropriate permissions - may be needed ?chmod-socket ?= 664 ?# clear environment on exit ?vacuum ????= truedaemonize = /home/ubuntu/mysite/uwsgi.logserver { ?# the port your site will be served on ?listen ??80; ?# the domain name it will serve for ?server_name 127.0.0.1; # substitute your machine's IP address or FQDN ?charset ??utf-8; ?# max upload size ?client_max_body_size 75M; ?# adjust to taste ?# Django media ?location /media { ???alias /home/ubuntu/mysite/media; # your Django project's media files - amend as required ?} ?location /static { ???alias /home/ubuntu/mysite/static; # your Django project's static files - amend as required ?} ?# Finally, send all non-media requests to the Django server. ?location / { ???include ??uwsgi_params; # the uwsgi_params file you installed ???uwsgi_pass 127.0.0.1:8001;#此處跟uwsgi配置文件保持一致 ?}}記得修改測試時的uwsgi.ini的配置。
第八步,運行
重啟nginx,運行uwsgi.
大功告成
以上這篇Django在Ubuntu14.04的部署方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持Vecloud。?

了解更多相關內容歡迎關注http://www.kd010.com/

Django在Ubuntu14.04的部署方法的評論 (共 條)

分享到微博請遵守國家法律
广安市| 梨树县| 文成县| 鹤岗市| 沁阳市| 澄城县| 尼木县| 都安| 东丽区| 麟游县| 高淳县| 普安县| 阿坝| 黔南| 仁布县| 武隆县| 梅河口市| 门源| 娄烦县| 西宁市| 香格里拉县| 崇文区| 呈贡县| 广宗县| 武陟县| 冷水江市| 同德县| 伊宁县| 磐石市| 石屏县| 普兰县| 五常市| 且末县| 甘谷县| 渝中区| 营山县| 射阳县| 齐齐哈尔市| 鄂尔多斯市| 乐都县| 岳西县|