This commit is contained in:
baoliang 2018-09-01 01:24:08 +08:00
parent 234ceadfc1
commit bbb34b073a
3 changed files with 48 additions and 0 deletions

28
g214_nginx.conf Normal file
View File

@ -0,0 +1,28 @@
# mysite_nginx.conf
# the upstream component nginx needs to connect to
upstream django {
server unix:///tmp/g214.sock; # for a file socket
}
# configuration of the server
server {
# the port your site will be served on
listen 8000;
# the domain name it will serve for
server_name example.com; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 1024M; # adjust to taste
location /static {
alias /var/www/g214/shared/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 /var/www/g214/current/uwsgi_params; # the uwsgi_params file you installed
}
}

20
g214_uwsgi.ini Normal file
View File

@ -0,0 +1,20 @@
# mysite_uwsgi.ini file
[uwsgi]
# Django-related settings
# the base directory (full path)
chdir = /var/www/g214/current
# Django's wsgi file
module = g214.wsgi
# process-related settings
# master
master = true
# maximum number of worker processes
processes = 10
# the socket (use the full path to be safe
socket = /tmp/g214.sock
# ... with appropriate permissions - may be needed
chmod-socket = 664
# clear environment on exit
vacuum = true

Binary file not shown.