Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. ############################ /etc/nginx/nginx.conf #############
  2.  
  3. user www-data;
  4. worker_processes auto;
  5. pid /run/nginx.pid;
  6. include /etc/nginx/modules-enabled/*.conf;
  7.  
  8. events {
  9. worker_connections 768;
  10. # multi_accept on;
  11. }
  12.  
  13. http {
  14.  
  15. ##
  16. # Basic Settings
  17. ##
  18.  
  19. sendfile on;
  20. tcp_nopush on;
  21. tcp_nodelay on;
  22. keepalive_timeout 65;
  23. types_hash_max_size 2048;
  24. # server_tokens off;
  25.  
  26. # server_names_hash_bucket_size 64;
  27. # server_name_in_redirect off;
  28.  
  29. include /etc/nginx/mime.types;
  30. default_type application/octet-stream;
  31.  
  32. ##
  33. # SSL Settings
  34. ##
  35.  
  36. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  37. ssl_prefer_server_ciphers on;
  38.  
  39. ##
  40. # Logging Settings
  41. ##
  42.  
  43. access_log /var/log/nginx/access.log;
  44. error_log /var/log/nginx/error.log;
  45.  
  46. ##
  47. # Gzip Settings
  48. ##
  49.  
  50. gzip on;
  51. # gzip_vary on;
  52. # gzip_proxied any;
  53. # gzip_comp_level 6;
  54. # gzip_buffers 16 8k;
  55. # gzip_http_version 1.1;
  56. # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  57.  
  58. ##
  59. # Virtual Host Configs
  60. ##
  61.  
  62. include /etc/nginx/conf.d/*.conf;
  63. include /etc/nginx/sites-enabled/*;
  64. }
  65.  
  66.  
  67. #mail {
  68. # # See sample authentication script at:
  69. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  70. #
  71. # # auth_http localhost/auth.php;
  72. # # pop3_capabilities "TOP" "USER";
  73. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  74. #
  75. # server {
  76. # listen localhost:110;
  77. # protocol pop3;
  78. # proxy on;
  79. # }
  80. #
  81. # server {
  82. # listen localhost:143;
  83. # protocol imap;
  84. # proxy on;
  85. # }
  86. #}
  87.  
  88.  
  89. ######################### sudo nano /etc/nginx/sites-available/redirect_app ######################
  90.  
  91. server {
  92. listen 80;
  93. server_name redirect;
  94.  
  95. location /dev/ {
  96. rewrite ^/dev/(.*) /$1 break;
  97. include uwsgi_params;
  98. uwsgi_pass unix:/home/danila/work/redirect_app/redirect_app.sock;
  99. }
  100. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement