nginx.conf 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #user nobody;
  2. worker_processes 1;
  3. #error_log error.log;
  4. error_log /var/log/nginx/error.log notice;
  5. error_log /var/log/nginx/error.log info;
  6. pid nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. '$status $body_bytes_sent "$http_referer" '
  15. '"$http_user_agent" "$http_x_forwarded_for"';
  16. access_log /var/log/nginx/access.log main;
  17. sendfile on;
  18. #tcp_nopush on;
  19. #keepalive_timeout 0;
  20. keepalive_timeout 65;
  21. gzip on;
  22. server {
  23. listen 80;
  24. #server_name localhost;
  25. #root /Users/michael/Documents/qmth/web-deploy/dist;
  26. root /opt/dist;
  27. # root .;
  28. # location /(wap|web) {
  29. # try_files $uri $uri/ /index.html;
  30. # }
  31. location / {
  32. try_files $uri $uri/ /index.html;
  33. }
  34. # location /admin {
  35. # try_files $uri $uri/ /index.html;
  36. # }
  37. # location ~* /(api|upload) {
  38. # client_max_body_size 20m;
  39. # proxy_set_header Host $host;
  40. # proxy_set_header X-Real-IP $remote_addr;
  41. # proxy_connect_timeout 30s;
  42. # proxy_send_timeout 300s;
  43. # proxy_read_timeout 300s;
  44. # proxy_pass http://localhost:7001;
  45. # }
  46. # error_page 404 /404.html;
  47. # redirect server error pages to the static page /50x.html
  48. #
  49. # error_page 500 502 503 504 /50x.html;
  50. #location = /50x.html {
  51. # # root html;
  52. #}
  53. }
  54. }