prod.conf 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. server {
  2. listen 80;
  3. server_name worldm.labitumall.com;
  4. #access_log /opt/apps/wine-world/labitu-wx/logs/ngx_access.log main;# buffer=16k;
  5. #error_log /opt/apps/wine-world/labitu-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/dist/worldm.labitumall.com/;
  11. location /.well-known/pki-validation/ {
  12. alias /opt/apps/wine-world/labitu-wx/static/;
  13. }
  14. location =/MP_verify_2T3baURk4a7z6l8x.txt {
  15. root /opt/apps/wine-world/labitu-wx/static/;
  16. #expires 30d;
  17. }
  18. location =/favicon.ico {
  19. root /opt/apps/dist/worldm.labitumall.com/static/;
  20. expires 30d;
  21. }
  22. location /static/js {
  23. root /opt/apps/dist/worldm.labitumall.com;
  24. expires 30d;
  25. gzip_static on;
  26. }
  27. location /static/css {
  28. root /opt/apps/dist/worldm.labitumall.com;
  29. expires 30d;
  30. gzip_static on;
  31. }
  32. location /static/img {
  33. root /opt/apps/dist/worldm.labitumall.com;
  34. expires 30d;
  35. }
  36. location / {
  37. try_files $uri $uri/ /index.html;
  38. expires 30d;
  39. #rewrite ^(.*)$ /static/maintain.html break;
  40. }
  41. }
  42. # HTTPS server
  43. server {
  44. listen 443 ssl;
  45. server_name worldm.labitumall.com;
  46. charset utf-8;
  47. #ssl on;
  48. ssl_certificate /opt/apps/wine-world/labitu-wx/static/4831150_worldm.labitumall.com.pem;
  49. ssl_certificate_key /opt/apps/wine-world/labitu-wx/static/4831150_worldm.labitumall.com.key;
  50. ssl_session_cache shared:SSL:1m;
  51. ssl_session_timeout 5m;
  52. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  53. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  54. ssl_prefer_server_ciphers on;
  55. location / {
  56. #proxy_next_upstream off;
  57. #proxy_set_header X-Real-IP $remote_addr;
  58. #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  59. #proxy_set_header Host $host;
  60. #proxy_http_version 1.1;
  61. #proxy_set_header Connection "";
  62. proxy_pass http://worldm.labitumall.com;
  63. }
  64. }