def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
return ["Hello World"]
uwsgi --http :8001 --plugin python --wsgi-file test.py
python manage.py runserver 0.0.0.0:8002
uwsgi --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 = true
daemonize = /home/ubuntu/mysite/uwsgi.log
server {
# 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配置文件保持一致
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有