Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ####################### UWSGI
- # artcolor_uwsgi.ini file
- [uwsgi]
- # Django-related settings
- # the base directory (full path)
- chdir = /home/seb/pypassion/artcolor/src/
- # Django's wsgi file
- module = artcolor.wsgi
- # the virtualenv (full path)
- home = /home/seb/pypassion/artcolor/artcolor_venv/
- # process-related settings
- # master
- master = true
- # maximum number of worker processes
- processes = 10
- # the socket (use the full path to be safe
- socket = /home/seb/pypassion/artcolor/src/artcolor.sock
- #http-socket = :8001
- # ... with appropriate permissions - may be needed
- # chmod-socket = 664
- # clear environment on exit
- #vacuum = true
- ####################### WSGI
- # -*- coding: utf-8 -*-
- import os
- import sys
- sys.path.insert(0,"/home/seb/pypassion/artcolor/src")
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "artcolor.settings")
- from django.core.wsgi import get_wsgi_application
- application = get_wsgi_application()
- ############################ nginx
- upstream django {
- server /home/seb/pypassion/artcolor/src/artcolor.sock; # for a file socket
- #server 127.0.0.1:8001; # for a web port socket (we'll use this first)
- }
- # configuration of the server
- server {
- # the port your site will be served on
- listen 9015;
- server_name localhost; # substitute your machine's IP address or FQDN
- charset utf-8;
- access_log /home/seb/pypassion/artcolor/logs/nginx-access.log;
- error_log /home/seb/pypassion/artcolor/logs/nginx-error.log;
- # max upload size
- client_max_body_size 1G; # adjust to taste
- # Django media
- location /media/ {
- alias /home/seb/pypassion/artcolor/src/media/; # your Django project's media files - amend as required
- }
- location /static/ {
- alias /home/seb/pypassion/artcolor/src/static/; # your Django project's static files - amend as required
- }
- # Finally, send all non-media requests to the Django server.
- location / {
- uwsgi_pass django;
- include uwsgi_params; # the uwsgi_params file you installed
- }
- }
- ########################### console
- (artcolor_venv)seb@debian:~/pypassion/artcolor/src$ uwsgi --ini artcolor_uwsgi.ini
- [uWSGI] getting INI configuration from artcolor_uwsgi.ini
- *** Starting uWSGI 2.0.9 (64bit) on [Fri Feb 27 12:40:15 2015] ***
- compiled with version: 4.7.2 on 27 February 2015 11:00:34
- os: Linux-3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2
- nodename: debian
- machine: x86_64
- clock source: unix
- pcre jit disabled
- detected number of CPU cores: 8
- current working directory: /home/seb/pypassion/artcolor/src
- detected binary path: /home/seb/pypassion/artcolor/artcolor_venv/bin/uwsgi
- chdir() to /home/seb/pypassion/artcolor/src/
- your processes number limit is 63796
- your memory page size is 4096 bytes
- detected max file descriptor number: 1024
- lock engine: pthread robust mutexes
- thunder lock: disabled (you can enable it with --thunder-lock)
- uwsgi socket 0 bound to UNIX address /home/seb/pypassion/artcolor/src/artcolor.sock fd 3
- Python version: 2.7.3 (default, Mar 13 2014, 11:26:58) [GCC 4.7.2]
- Set PythonHome to /home/seb/pypassion/artcolor/artcolor_venv/
- *** Python threads support is disabled. You can enable it with --enable-threads ***
- Python main interpreter initialized at 0x1c2ad30
- your server socket listen backlog is limited to 100 connections
- your mercy for graceful operations on workers is 60 seconds
- mapped 800448 bytes (781 KB) for 10 cores
- *** Operational MODE: preforking ***
- WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1c2ad30 pid: 16539 (default app)
- *** uWSGI is running in multiple interpreter mode ***
- spawned uWSGI master process (pid: 16539)
- spawned uWSGI worker 1 (pid: 16540, cores: 1)
- spawned uWSGI worker 2 (pid: 16541, cores: 1)
- spawned uWSGI worker 3 (pid: 16542, cores: 1)
- spawned uWSGI worker 4 (pid: 16543, cores: 1)
- spawned uWSGI worker 5 (pid: 16544, cores: 1)
- spawned uWSGI worker 6 (pid: 16545, cores: 1)
- spawned uWSGI worker 7 (pid: 16546, cores: 1)
- spawned uWSGI worker 8 (pid: 16547, cores: 1)
- spawned uWSGI worker 9 (pid: 16548, cores: 1)
- spawned uWSGI worker 10 (pid: 16549, cores: 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement