University graduation project made with python

  Foreword: I believe that the friends who read this article have more or less some programming foundation and understand some basic commands of linux. This article will guide you how to deploy a website developed using the django framework for cloud server side deployment.

Tools used in the article

  • Python: a programming language that can only process back-end data and manage front-end HTML files, and cannot be used to process HTTP requests
  • Nginx: web server for handling HTTP requests
  • uWsgi: A third-party library for Python, which establishes interactive communication between Nginx and Python environments
  • Django: Python's web development framework, deploy HTML files and databases

Next I will demonstrate step by step through the following cloud server,

0. Create a cloud server (choose a free one)

1. Connect to cloud server

1.0.0 connect through idea's ssh

 Enter your cloud server ip and password, the default user name is ssh, a console will come out after the connection is successful

You can operate your cloud server in this console 

1.0.1 Establish file connection

 Configured to add file mapping (your local project address and server project address), and then click to browse the remote host

The effect is as follows, you can directly see the files in the target virtual machine

 1.0.2 Upload the required files of the project to the cloud server

Right click on the project file -> Deploy -> Upload to sfy

2. Installation of server-side applications

2.0 Component Flowchart

 nginx: Used as a forwarding and reverse proxy, basically all servers will use this, some people may ask if it is okay not to use it? If it’s just for testing, you don’t need to use it. The concurrency that the web containers in python and java can carry is too small. Using nginx can increase the carrying capacity. For example: when 100 people visit your website at the same time without using nginx, your The website is down. If you use nginx, it is no problem for 1000 people to visit at the same time.

uwsgi: Listening port, mainly listening to requests forwarded by nginx for processing.

You only need to understand the components, and you can install and use them.

Guess you like

Origin blog.csdn.net/m0_56620467/article/details/130545630