Advertisement
Guest User

Untitled

a guest
Jul 20th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. upstream datahunt_server {
  2. server 127.0.0.1:9500 fail_timeout=0;
  3. }
  4. server {
  5. listen 80;
  6. listen [::]:80;
  7. root /home/django/datahunt;
  8. index index.html index.htm;
  9. client_max_body_size 4G;
  10. server_name datahunt.com www.datahunt.com;
  11. keepalive_timeout 5;
  12. location ~* .(jpg|jpeg|png|gif|ico|css|js|woff2|woff|ttf)$ {
  13. expires 365d;
  14. }
  15.  
  16. # Your Django project's media files - amend as required
  17. location /media {
  18. alias /home/django/datahunt/media/;
  19. }
  20. # your Django project's static files - amend as required
  21. location static/static-only {
  22. alias /home/django/datahunt/static-only/;
  23. }
  24. # Django static images
  25. location /static/images {
  26. alias /home/django/datahunt/static/static-only/images/;
  27. }
  28.  
  29. # Proxy the static assests for the Django Admin panel
  30. location /static/admin {
  31. alias /usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin;
  32. }
  33.  
  34. location / {
  35. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  36. proxy_set_header Host $http_host;
  37. proxy_redirect off;
  38. proxy_pass http://datahunt_server;
  39. proxy_connect_timeout 60s;
  40.  
  41. }
  42. }
  43.  
  44. user www-data;
  45. worker_processes 4;
  46. pid /run/nginx.pid;
  47.  
  48. events {
  49. worker_connections 768;
  50. # multi_accept on;
  51. }
  52.  
  53. http {
  54.  
  55. ##
  56. # Basic Settings
  57. ##
  58.  
  59. sendfile on;
  60. tcp_nopush on;
  61. tcp_nodelay on;
  62. keepalive_timeout 15;
  63. types_hash_max_size 2048;
  64. # server_tokens off;
  65.  
  66. # server_names_hash_bucket_size 64;
  67. # server_name_in_redirect off;
  68.  
  69. include /etc/nginx/mime.types;
  70. default_type application/octet-stream;
  71. proxy_connect_timeout 10;
  72. proxy_send_timeout 15;
  73. proxy_read_timeout 20;
  74. ##
  75. # Logging Settings
  76. ##
  77. # limit_conn_zone $binary_remote_addr zone=per_ip:5m;
  78. access_log /var/log/nginx/access.log;
  79. error_log /var/log/nginx/error.log;
  80.  
  81. ##
  82. # Gzip Settings
  83. ##
  84.  
  85. gzip on;
  86. gzip_disable "msie6";
  87.  
  88. gzip_vary on;
  89. gzip_proxied any;
  90. gzip_comp_level 6;
  91. gzip_buffers 16 8k;
  92. gzip_http_version 1.1;
  93. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  94.  
  95. ##
  96. # nginx-naxsi config
  97. ##
  98. # Uncomment it if you installed nginx-naxsi
  99. ##
  100.  
  101. #include /etc/nginx/naxsi_core.rules;
  102.  
  103. ##
  104. # nginx-passenger config
  105. ##
  106. # Uncomment it if you installed nginx-passenger
  107. ##
  108.  
  109. #passenger_root /usr;
  110. #passenger_ruby /usr/bin/ruby;
  111.  
  112. ##
  113. # Virtual Host Configs
  114. ##
  115.  
  116. include /etc/nginx/conf.d/*.conf;
  117. include /etc/nginx/sites-enabled/*;
  118. }
  119.  
  120.  
  121. #mail {
  122. # # See sample authentication script at:
  123. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  124. #
  125. # # auth_http localhost/auth.php;
  126. # # pop3_capabilities "TOP" "USER";
  127. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  128. #
  129. # server {
  130. # listen localhost:110;
  131. # protocol pop3;
  132. # proxy on;
  133. # }
  134. #
  135. # server {
  136. # listen localhost:143;
  137. # protocol imap;
  138. # proxy on;
  139. # }
  140. #}
  141.  
  142. EMAIL_TLS_USER = True
  143. EMAIL_HOST = 'smtp.zoho.com'
  144. EMAIL_PORT = 465
  145. EMAIL_HOST_USER = 'no-reply@datahunt.com
  146. EMAIL_HOST_PASSWORD = 'mypassword'
  147. ACCOUNT_ACTIVATION = 7
  148. REGISTRATION_AUTO_LOGIN = True
  149. SITE_ID = 1
  150. LOGIN_REDIRECT_URL = '/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement