-
-
Save mrChex/6537751 to your computer and use it in GitHub Desktop.
change from port to unix socket
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name www.domain.com; | |
| root /sites/mysite/; | |
| access_log /path/to/nginx/access.log; | |
| error_log /path/to/nginx/error.log; | |
| location /media/ { | |
| alias /path/to/project/media/; | |
| } | |
| location /static/ { | |
| alias /path/to/project/static/; | |
| } | |
| location / { | |
| include uwsgi_params; | |
| uwsgi_pass unix:///path/to/unix.socket; | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [program:uwsgi] | |
| user = uwsgi | |
| command=/opt/bin/uwsgi --ini=/path/to/uwsgi.ini | |
| autostart=true | |
| autorestart=true | |
| stderr_logfile = /path/to/error.log | |
| stdout_logfile = /path/tp/out.log | |
| stopsignal=INT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [uwsgi] | |
| chdir=/path/to/src | |
| chmod=777 | |
| module=app.wsgi:application | |
| master=True | |
| pidfile=/path/to/file.pid | |
| vacuum=True | |
| max-requests=5000 | |
| daemonize=/path/to/uwsgi.log | |
| home=/path/to/project/virtualenv/.env | |
| socket=/path/to/unix.socket |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os,sys | |
| import django.core.handlers.wsgi | |
| os.environ['DJANGO_SETTINGS_MODULE'] = 'settings.production' | |
| application = django.core.handlers.wsgi.WSGIHandler() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment