-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added django_sample project , nginx conf files for gunicorn and uwsgi…
…. updated uwsgi.ini, run.sh, nginx's log style.
- Loading branch information
Showing
7,294 changed files
with
30,215 additions
and
869,373 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains 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
61 changes: 61 additions & 0 deletions
61
config/web-server/nginx/gunicorn/conf.d/django_sample_gunicorn_ng.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
server { | ||
listen 80; | ||
server_name localhost www.localhost; | ||
|
||
access_log /log/nginx/django_sample.com.access.log main; | ||
error_log /log/nginx/django_sample.com.error.log warn; | ||
|
||
# Django media | ||
location /media { | ||
gzip_static on; | ||
expires max; | ||
#alias /www/django_sample/django_sample/media; | ||
alias /www/django_sample/media; # your Django project's media files - amend as required | ||
#include /etc/nginx/mime.types; | ||
} | ||
|
||
location /static { | ||
gzip_static on; | ||
expires max; | ||
#alias /www/django_sample/django_sample/static; | ||
# normally static folder is named as /static | ||
alias /www/django_sample/static; # your Django project's static files - amend as required | ||
#include /etc/nginx/mime.types; | ||
} | ||
|
||
location / { | ||
proxy_pass http://gunicorn-app:8000; | ||
# proxy_redirect http:// https://; | ||
|
||
} | ||
|
||
# Allow Lets Encrypt Domain Validation Program | ||
location ^~ /.well-known/acme-challenge/ { | ||
allow all; | ||
} | ||
|
||
# Block dot file (.htaccess .htpasswd .svn .git .env and so on.) | ||
location ~ /\. { | ||
deny all; | ||
} | ||
|
||
# Block (log file, binary, certificate, shell script, sql dump file) access. | ||
location ~* \.(log|binary|pem|enc|crt|conf|cnf|sql|sh|key|yml|lock)$ { | ||
deny all; | ||
} | ||
|
||
# Block access | ||
location ~* (composer\.json|composer\.lock|composer\.phar|contributing\.md|license\.txt|readme\.rst|readme\.md|readme\.txt|copyright|artisan|gulpfile\.js|package\.json|phpunit\.xml|access_log|error_log|gruntfile\.js)$ { | ||
deny all; | ||
} | ||
|
||
location = /favicon.ico { | ||
log_not_found off; | ||
access_log off; | ||
} | ||
|
||
location = /robots.txt { | ||
log_not_found off; | ||
access_log off; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
75 changes: 75 additions & 0 deletions
75
config/web-server/nginx/uwsgi/conf.d/django_sample_uwsgi_ng.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
server { | ||
listen 80; | ||
server_name localhost www.localhost; | ||
|
||
access_log /log/nginx/django_sample.com.access.log main; | ||
error_log /log/nginx/django_sample.com.error.log warn; | ||
|
||
# Django media | ||
location /media { | ||
gzip_static on; | ||
expires max; | ||
#alias /www/django_sample/django_sample/media; | ||
alias /www/django_sample/media; # your Django project's media files - amend as required | ||
#include /etc/nginx/mime.types; | ||
} | ||
|
||
location /static { | ||
gzip_static on; | ||
expires max; | ||
#alias /www/django_sample/django_sample/static; | ||
# normally static folder is named as /static | ||
alias /www/django_sample/static; # your Django project's static files - amend as required | ||
#include /etc/nginx/mime.types; | ||
} | ||
|
||
location / { | ||
uwsgi_pass uwsgi-app:8000; | ||
|
||
uwsgi_max_temp_file_size 20480m; | ||
uwsgi_buffering off; | ||
uwsgi_ignore_client_abort on; | ||
uwsgi_buffers 2560 160k; | ||
uwsgi_buffer_size 2560k; | ||
uwsgi_connect_timeout 30s; | ||
uwsgi_send_timeout 30s; | ||
uwsgi_read_timeout 30s; | ||
uwsgi_busy_buffers_size 2560k; | ||
uwsgi_temp_file_write_size 2560k; | ||
proxy_read_timeout 30s; | ||
proxy_connect_timeout 75s; | ||
|
||
#proxy_pass http://uwsgi-app:9000; | ||
|
||
} | ||
|
||
# Allow Lets Encrypt Domain Validation Program | ||
location ^~ /.well-known/acme-challenge/ { | ||
allow all; | ||
} | ||
|
||
# Block dot file (.htaccess .htpasswd .svn .git .env and so on.) | ||
location ~ /\. { | ||
deny all; | ||
} | ||
|
||
# Block (log file, binary, certificate, shell script, sql dump file) access. | ||
location ~* \.(log|binary|pem|enc|crt|conf|cnf|sql|sh|key|yml|lock)$ { | ||
deny all; | ||
} | ||
|
||
# Block access | ||
location ~* (composer\.json|composer\.lock|composer\.phar|contributing\.md|license\.txt|readme\.rst|readme\.md|readme\.txt|copyright|artisan|gulpfile\.js|package\.json|phpunit\.xml|access_log|error_log|gruntfile\.js)$ { | ||
deny all; | ||
} | ||
|
||
location = /favicon.ico { | ||
log_not_found off; | ||
access_log off; | ||
} | ||
|
||
location = /robots.txt { | ||
log_not_found off; | ||
access_log off; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+161 Bytes
www/django_sample/django_sample/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.