2
0

nginx.conf 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. user root;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4. events {
  5. worker_connections 768;
  6. # multi_accept on;
  7. }
  8. http {
  9. ##
  10. # Basic Settings
  11. ##
  12. sendfile on;
  13. tcp_nopush on;
  14. tcp_nodelay on;
  15. keepalive_timeout 65;
  16. types_hash_max_size 2048;
  17. # server_tokens off;
  18. client_max_body_size 1000M;
  19. # server_names_hash_bucket_size 64;
  20. # server_name_in_redirect off;
  21. include mime.types;
  22. default_type application/octet-stream;
  23. ##
  24. # SSL Settings
  25. ##
  26. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  27. ssl_prefer_server_ciphers on;
  28. ##
  29. # Logging Settings
  30. ##
  31. access_log /var/log/nginx/access.log;
  32. error_log /var/log/nginx/error.log;
  33. ##
  34. # Gzip Settings
  35. ##
  36. gzip on;
  37. gzip_disable "msie6";
  38. # gzip_vary on;
  39. # gzip_proxied any;
  40. # gzip_comp_level 6;
  41. # gzip_buffers 16 8k;
  42. # gzip_http_version 1.1;
  43. # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  44. ##
  45. # Virtual Host Configs
  46. ##
  47. #include /etc/nginx/conf.d/*.conf;
  48. #include /etc/nginx/sites-enabled/*;
  49. server {
  50. listen 80;
  51. #server_name loonflow.com;
  52. access_log /var/log/loonflow/nginx_access.log ;
  53. error_log /var/log/loonflow/nginx_error.log ;
  54. location / {
  55. root /opt/loonflow/frontend/dist;
  56. index index.html index.htm;
  57. try_files $uri $uri/ /index.html;
  58. }
  59. location /admin_old {
  60. include uwsgi_params;
  61. uwsgi_pass 127.0.0.1:8630;
  62. }
  63. location /api {
  64. include uwsgi_params;
  65. uwsgi_pass 127.0.0.1:8630;
  66. }
  67. location ^~/media {
  68. alias /opt/loonflow/media;
  69. }
  70. location ^~/templates {
  71. alias /opt/loonflow/templates;
  72. }
  73. location ^~/static {
  74. alias /opt/loonflow/frontend/dist/static;
  75. }
  76. }
  77. }