prod.conf.bak 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. server {
  2. listen 80;
  3. server_name lfwx.hiwavo.com;
  4. #access_log /opt/apps/rabbit/wx/logs/ngx_access.log main;# buffer=16k;
  5. #error_log /opt/apps/rabbit/wx/logs/ngx_error.log;
  6. set $platform pc;
  7. if ($http_user_agent ~* "(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|MicroMessenger|WindowsWechat") {
  8. set $platform mobile;
  9. }
  10. root /opt/apps/rabbit/dist/lfwx.hiwavo.com/;
  11. location /.well-known/pki-validation/ {
  12. alias /opt/apps/rabbit/wx/static/;
  13. }
  14. location =/MP_verify_2T3baURk4a7z6l8x.txt {
  15. root /opt/apps/rabbit/api/go/gopath/src/rabbit.com/static/api/;
  16. #expires 30d;
  17. }
  18. location =/3lojqxxPvq.txt {
  19. root /opt/apps/rabbit/api/go/gopath/src/rabbit.com/static/api/;
  20. }
  21. location =/jd_root.txt {
  22. root /opt/apps/rabbit/api/go/gopath/src/rabbit.com/static/api/;
  23. }
  24. location =/favicon.ico {
  25. root /opt/apps/rabbit/wx/static/;
  26. expires 30d;
  27. }
  28. location /static/js {
  29. root /opt/apps/rabbit/dist/lfwx.hiwavo.com;
  30. expires 30d;
  31. }
  32. location /static/css {
  33. root /opt/apps/rabbit/dist/lfwx.hiwavo.com;
  34. expires 30d;
  35. }
  36. location /static/img {
  37. root /opt/apps/rabbit/dist/lfwx.hiwavo.com;
  38. expires 30d;
  39. }
  40. location / {
  41. try_files $uri $uri/ /index.html;
  42. expires 30d;
  43. #rewrite ^(.*)$ /static/maintain.html break;
  44. }
  45. }
  46. # HTTPS server
  47. server {
  48. listen 443;
  49. server_name lfwx.hiwavo.com;
  50. charset utf-8;
  51. ssl on;
  52. ssl_certificate /opt/apps/rabbit/wx/static/275452820190901.pem;
  53. ssl_certificate_key /opt/apps/rabbit/wx/static/275452820190901.key;
  54. ssl_session_cache shared:SSL:1m;
  55. ssl_session_timeout 5m;
  56. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  57. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  58. ssl_prefer_server_ciphers on;
  59. location / {
  60. #proxy_next_upstream off;
  61. #proxy_set_header X-Real-IP $remote_addr;
  62. #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  63. #proxy_set_header Host $host;
  64. #proxy_http_version 1.1;
  65. #proxy_set_header Connection "";
  66. proxy_pass http://lfwx.hiwavo.com;
  67. }
  68. }