nginx.conf 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #------------------------大数据平台前端------------------
  2. server{
  3. listen 80;
  4. charset utf8;
  5. server_name 114.55.0.7;
  6. client_header_buffer_size 32k;
  7. large_client_header_buffers 4 32k;
  8. location / {
  9. root /data/bigdata_vue_frond/dist;
  10. index index.html;
  11. add_header Access-Control-Allow-Origin *;
  12. etag on;
  13. }
  14. location /app {
  15. alias /data/app_file;
  16. index big_data.apk;
  17. add_header Access-Control-Allow-Origin *;
  18. # 开启索引功能
  19. autoindex off;
  20. # 关闭计算文件确切大小(单位bytes),只显示大概大小(单位kb、mb、gb)
  21. autoindex_exact_size off;
  22. # 显示本机时间而非 GMT 时间)
  23. autoindex_localtime on;
  24. }
  25. location /download_files {
  26. #文件所在的文件夹
  27. alias /data/download_files;
  28. sendfile on;
  29. autoindex on;
  30. autoindex_exact_size on;
  31. autoindex_localtime on;
  32. charset utf-8;
  33. }
  34. location /qxz {
  35. root /data/bigdata_test/bigdata/templates/qxz;
  36. index index.html;
  37. add_header Access-Control-Allow-Origin *;
  38. }
  39. location /down/excel/ {
  40. alias /data/www/down/export/excel/;
  41. }
  42. location ~ ^(images|javascript|js|css|flash|media|static)/ {
  43. root /data/bigdata_vue_frond/dist/static;
  44. expires 10d;
  45. }
  46. }
  47. #------------------------托莱斯气象站登录页------------------
  48. server{
  49. listen 80;
  50. charset utf8;
  51. server_name www.zztlskj.com;
  52. client_header_buffer_size 32k;
  53. large_client_header_buffers 4 32k;
  54. location /qx {
  55. alias /data/bigdata_vue_frond/dist;
  56. index index.html;
  57. add_header Access-Control-Allow-Origin *;
  58. }
  59. location / {
  60. root /data/bigdata_vue_frond/dist;
  61. index other.html;
  62. add_header Access-Control-Allow-Origin *;
  63. }
  64. location /down/excel/ {
  65. alias /data/www/down/export/excel/;
  66. }
  67. location ~ ^(images|javascript|js|css|flash|media|static)/ {
  68. root /data/bigdata_vue_frond/dist/static;
  69. expires 10d;
  70. }
  71. }