Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Integrated deployment of Django framework code and nginx

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Nginx

The installation is not described here, but directly to the key configuration.

Server {

Listen 80

Server_name _

Access_log / var/log/nginx/platform_admin.log main

Error_log / var/log/nginx/platform_admin_err.log

Location / static {

Root / var/www/platform_admin/resources/

}

Location / {

Uwsgi_pass 127.0.0.1:9999

Include uwsgi_params

}

}

2.python file parsing uses UWSGI, installation does not elaborate

[uwsgi]

Uid = root

Gid = root

Pidfile = / run/uwsgi/uwsgi.pid

Emperor = / etc/uwsgi.d

Stats = / run/uwsgi/stats.sock

Chmod-socket = 660

Emperor-tyrant = true

Socket = 127.0.0.1pur9999

Master = true

Processes = 4

Env DJANGO_SETTINGS_MODULE=platform_admin.settings

Chdir = / var/www/platform_admin

Wsgi-file = / var/www/platform_admin/platform_admin/wsgi.py

Module = platform_admin.wsgi:application

Profiler = true

Memory-report = true

Enable-threads = true

Logdata = true

Limit-as = 6048

Daemonize = / var/log/django_uwsgi.log

3. Start UWSGI

# / etc/init.d/uwsgi status

View statu

# / etc/init.d/uwsgi status

Uwsgi (pid 10596 10595 10594 10593 10591 10590) is running...

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report