分类目录归档:Technology-科技

How to set up Nginx+Gunicorn+Django(Python)


Nginx+Gunicorn+Django(Python)

When we have finished a project and going to delploy on the web, we might face the problem, how we are going to deploy. Here is my way to do it: Nginx+Gunicorn

Gunicorn is a kind of tool samialar with uWSGI but it's much more simple than uWSGI settiing.

Niginx setup

First you need to install the Niginx below is the niginx install command on centOS: yum install Niginx Waithing the install completed. Then we need to change the Nginx configure setting, normally it's under etc/Nginx/nginx.conf , after we opened it, we need to take a look where the configure file link the supported file:

server {
    listen       80 default_server;
    listen       [::]:80 default_server;
    server_name  _;
    root         /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
    }

Af...

Read more

What's Python


The Python Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, https://www.python.org/, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation.

The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C). Python is also suitable as an...

Read more