武汉四维h5程序,基于达闼设备,单独分开
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

97 line
2.7 KiB

  1. user www-data;
  2. worker_processes 1;
  3. error_log /var/log/nginx/error.log warn;
  4. pid /var/run/nginx.pid;
  5. events {
  6. worker_connections 1024;
  7. }
  8. http {
  9. include /etc/nginx/mime.types;
  10. default_type application/octet-stream;
  11. log_format main '$remote_addr($http_x_real_ip) - $remote_user [$time_local] '
  12. '$ssl_protocol/$ssl_cipher '
  13. '"$http_host($http_true_client_ip:$upstream_addr) $request" $status $body_bytes_sent '
  14. '"$http_referer" "$http_user_agent" "$http_x_forwarded_for"'
  15. '\n';
  16. access_log /var/log/nginx/access.log main;
  17. sendfile on;
  18. keepalive_timeout 65;
  19. gzip on;
  20. gzip_static on;
  21. gzip_vary on;
  22. gzip_disable "MSIE [1-6]\.";
  23. gzip_proxied expired no-cache no-store private auth;
  24. gzip_comp_level 1;
  25. gzip_min_length 10k;
  26. gzip_types
  27. text/plain
  28. text/css
  29. text/js
  30. text/javascript
  31. text/html
  32. text/xml
  33. text/x-component
  34. application/javascript
  35. application/x-javascript
  36. application/json
  37. application/xhtml+xml
  38. application/xml
  39. application/rss+xml
  40. application/x-font-ttf
  41. application/vnd.ms-fontobject
  42. font/truetype
  43. font/opentype
  44. image/svg+xml svg svgz;
  45. map $http_accept $webp_suffix {
  46. default "";
  47. "~*webp" ".webp";
  48. }
  49. map $msie $cache_control {
  50. "1" "private";
  51. }
  52. map $msie $vary_header {
  53. default "Accept";
  54. "1" "";
  55. }
  56. server {
  57. listen 8888 ssl http2;
  58. listen [::]:8888 ssl http2;
  59. server_name test.cloudminds.com;
  60. ssl_certificate /etc/nginx/cert/214971167760195.pem;
  61. ssl_certificate_key /etc/nginx/cert/214971167760195.key;
  62. ssl_session_cache shared:SSL:10m;
  63. ssl_session_timeout 10m;
  64. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  65. ssl_ciphers HIGH:!aNULL:!MD5;
  66. ssl_prefer_server_ciphers on;
  67. location / {
  68. root /srv/www/cloudia-fe-mall;
  69. index index.html;
  70. try_files $uri $uri/ /index.html;
  71. }
  72. location ~* .(jpe?g|png|gif|svg)$ {
  73. root /srv/www/cloudia-fe-mall;
  74. add_header Vary $vary_header;
  75. add_header Cache-Control $cache_control;
  76. try_files $uri$webp_suffix $uri =404;
  77. }
  78. error_page 500 502 503 504 /50x.html;
  79. location = /50x.html {
  80. root /usr/share/nginx/html;
  81. }
  82. }
  83. }