text nginx_wsgi_django.text

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text nginx_wsgi_django.text相关的知识,希望对你有一定的参考价值。

>> globally install uwsgi and nginx
sudo pip3 install uwsgi
sudo apt-get install nginx
>> move to django project dir and create config files
cd django_project
sudo nano uwsgi_params
>> file contents 
uwsgi_param  QUERY_STRING       $query_string;
uwsgi_param  REQUEST_METHOD     $request_method;
uwsgi_param  CONTENT_TYPE       $content_type;
uwsgi_param  CONTENT_LENGTH     $content_length;
uwsgi_param  REQUEST_URI        $request_uri;
uwsgi_param  PATH_INFO          $document_uri;
uwsgi_param  DOCUMENT_ROOT      $document_root;
uwsgi_param  SERVER_PROTOCOL    $server_protocol;
uwsgi_param  REQUEST_SCHEME     $scheme;
uwsgi_param  HTTPS              $https if_not_empty;
uwsgi_param  REMOTE_ADDR        $remote_addr;
uwsgi_param  REMOTE_PORT        $remote_port;
uwsgi_param  SERVER_PORT        $server_port;
uwsgi_param  SERVER_NAME        $server_name;
>> nginx config file
sudo nano /etc/nginx/sites-available/spoke_async_process_handling_api.conf
>> file contents
# spoke_async_process_handling_api_nginx.conf
# the upstream component nginx needs to connect to
upstream django {
    server unix:///home/ubuntu/spoke_async_process_handling_api/spoke_async_process_handling_api.sock;
}
# configuration of the server
server {
    # the port your site will be served on
    listen      80;
    # the domain name it will serve for
    server_name ec2-35-177-170-145.eu-west-2.compute.amazonaws.com;
    charset     utf-8;
    # max upload size
    client_max_body_size 75M;
    # send all non-media requests to the Django server.
    location / {
        uwsgi_pass  django;
        include     /home/ubuntu/spoke_async_process_handling_api/uwsgi_params;
    }
}
>> Symlink from /etc/nginx/sites-enabled so nginx can see it
sudo ln -s /etc/nginx/sites-available/spoke_async_handling_api_nginx.conf /etc/nginx/sites-enabled/
>> restart nginx
sudo service nginx restart
>> Run uWSGI manually (check everything is ok)
uwsgi --socket spoke_async_process_handling_api.sock --module spoke_core.wsgi --chmod-socket=666
>> Run with ini file
sudo nano uwsgi.ini
>> file contents
# uwsgi.ini file
[uwsgi]
# Django-related settings
# the base directory (full path)
chdir           = /home/ubuntu/spoke_async_process_handling_api
# Django's wsgi file
module          = spoke_core.wsgi
# the virtualenv (full path)
# home            = /path/to/virtualenv
# process-related settings
# master
master          = true
# maximum number of worker processes
processes       = 10
# the socket (use the full path to be safe
socket          = /home/ubuntu/spoke_async_process_handling_api/spoke_async_process_handling_api.sock
chmod-socket    = 666
# clear environment on exit
vacuum          = true
>> Run file
uwsgi --ini uwsgi.ini
>> Emperor mode
sudo mkdir /etc/uwsgi
sudo mkdir /etc/uwsgi/vassals
sudo ln -s /home/ubuntu/spoke_async_process_handling_api/uwsgi.ini /etc/uwsgi/vassals/
sudo uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data
>> Run at startup (boot up)
Add the following to /etc/rc.local
/usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data --daemonize /var/log/uwsgi-emperor.log
Before the line “exit 0”

以上是关于text nginx_wsgi_django.text的主要内容,如果未能解决你的问题,请参考以下文章

VB中 如何复制Text1.text的字体到剪贴板? 如何剪切?

VB 加减乘除

text-decoration:[ text-decoration-line ] || [ text-decoration-style ] || [ text-decoration-color ]

.text 和 .get_text() 之间的区别

javascript或css:如何隐藏标签内的文本中的任何数字,后跟点前缀“1.text”,“2.text”...“30.text”

Crystal报告如果这个或那个那么this2