improve install docs, gunicorn and nginx config, fix django version in settings
This commit is contained in:
parent
beb7da7b0c
commit
8e911f488f
@ -8,8 +8,9 @@ SOCKFILE=/srv/nsupdate/run/gunicorn.sock # communication socket
|
|||||||
PIDFILE=/srv/nsupdate/run/gunicorn.pid
|
PIDFILE=/srv/nsupdate/run/gunicorn.pid
|
||||||
USER=www-data # the user to run as
|
USER=www-data # the user to run as
|
||||||
GROUP=www-data # the group to run as
|
GROUP=www-data # the group to run as
|
||||||
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
|
NUM_WORKERS=1 # how many worker processes should Gunicorn spawn
|
||||||
DJANGO_SETTINGS_MODULE=nsupdate.settings.dev # which settings file should Django use
|
# note: use 1 for sqlite database, more for postgres
|
||||||
|
DJANGO_SETTINGS_MODULE=local_settings # which settings file should Django use
|
||||||
DJANGO_WSGI_MODULE=nsupdate.wsgi # WSGI module name
|
DJANGO_WSGI_MODULE=nsupdate.wsgi # WSGI module name
|
||||||
|
|
||||||
echo "Starting $NAME"
|
echo "Starting $NAME"
|
||||||
|
@ -3,14 +3,11 @@ upstream nsupdate_server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen :80;
|
listen 0.0.0.0:80;
|
||||||
server_name www.nsupdate.info;
|
|
||||||
return 301 http://nsupdate.info$request_uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen :80;
|
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
listen 0.0.0.0:443 ssl;
|
||||||
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
server_name nsupdate.info ipv4.nsupdate.info ipv6.nsupdate.info;
|
server_name nsupdate.info ipv4.nsupdate.info ipv6.nsupdate.info;
|
||||||
|
|
||||||
access_log /srv/nsupdate/logs/nginx-access.log;
|
access_log /srv/nsupdate/logs/nginx-access.log;
|
||||||
@ -31,4 +28,11 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
error_page 500 502 503 504 /500.html;
|
error_page 500 502 503 504 /500.html;
|
||||||
|
|
||||||
|
ssl_certificate /etc/ssl/local/nsupdate.info.pem;
|
||||||
|
ssl_certificate_key /etc/ssl/private/nsupdate.info.pem;
|
||||||
|
|
||||||
|
ssl_session_timeout 5m;
|
||||||
|
|
||||||
|
include ssl_params;
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,5 @@ WWW_IPV4_HOST = 'ipv4.' + BASEDOMAIN # a host with ONLY a ipv4 address
|
|||||||
WWW_IPV6_HOST = 'ipv6.' + BASEDOMAIN # a host with ONLY a ipv6 address
|
WWW_IPV6_HOST = 'ipv6.' + BASEDOMAIN # a host with ONLY a ipv6 address
|
||||||
|
|
||||||
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
||||||
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
# See https://docs.djangoproject.com/en/1.6/ref/settings/#allowed-hosts
|
||||||
ALLOWED_HOSTS = [WWW_HOST, WWW_IPV4_HOST, WWW_IPV6_HOST]
|
ALLOWED_HOSTS = [WWW_HOST, WWW_IPV4_HOST, WWW_IPV6_HOST]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user