nginx.conf 1005 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. server {
  11. listen 80;
  12. server_name form.tec-do.com;
  13. root /usr/share/nginx/html;
  14. location / {
  15. # 静态文件地址 root访问路径会把请求的路径带上
  16. root /usr/share/nginx/html;
  17. try_files $uri$args $uri$args/ /index.html;
  18. index index.html index.htm;
  19. }
  20. location /tduck-api/{
  21. proxy_set_header Host $http_host;
  22. proxy_set_header X-Real-IP $remote_addr;
  23. proxy_set_header REMOTE-HOST $remote_addr;
  24. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25. proxy_pass http://tduck-app:8999/tduck-api/;
  26. }
  27. #error_page 500 502 503 504 /50x.html;
  28. #location = /50x.html {
  29. # root html;
  30. #}
  31. }
  32. }