nginx-linzh-https.conf 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. user nginx;
  2. worker_processes 1;
  3. error_log /var/error.log info;
  4. worker_rlimit_nofile 1024;
  5. events {
  6. worker_connections 1024;
  7. }
  8. http
  9. {
  10. include mime.types;
  11. default_type application/octet-stream;
  12. fastcgi_buffer_size 32k;
  13. fastcgi_buffers 8 32k;
  14. underscores_in_headers on;
  15. client_max_body_size 1024M;
  16. sendfile on;
  17. keepalive_timeout 65;
  18. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  19. '$status $body_bytes_sent "$http_referer" '
  20. '"$http_user_agent" "$http_x_forwarded_for"';
  21. server
  22. {
  23. listen 443 ssl;
  24. set $folder_name /var/www/html;
  25. server_name www.lzkj168.cn;
  26. root $folder_name;
  27. ssl_certificate cert/www.lzkj168.cn.pem;
  28. ssl_certificate_key cert/www.lzkj168.cn.key;
  29. ssl_session_cache shared:SSL:1m;
  30. ssl_session_timeout 5m;
  31. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #使用此加密套件。
  32. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #使用该协议进行配置。
  33. ssl_prefer_server_ciphers on;
  34. index index.html index.php;
  35. client_max_body_size 100m;
  36. proxy_connect_timeout 500s;
  37. proxy_read_timeout 500s;
  38. proxy_send_timeout 500s;
  39. fastcgi_connect_timeout 75;
  40. fastcgi_read_timeout 600;
  41. fastcgi_send_timeout 600;
  42. charset utf-8;
  43. location /logs {
  44. deny all;
  45. return 403;
  46. }
  47. location /data/log {
  48. deny all;
  49. return 403;
  50. }
  51. location / {
  52. index index.html index.htm index.php;
  53. }
  54. location /mshop {
  55. root $folder_name;
  56. autoindex on;
  57. index index.html index.htm index.php;
  58. try_files $uri $uri/ /mshop/index.html;
  59. }
  60. location /plot {
  61. root $folder_name;
  62. proxy_pass http://172.16.110.30:5000;
  63. proxy_redirect off;
  64. proxy_set_header Host $host;
  65. proxy_set_header X-Real-IP $remote_addr;
  66. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  67. proxy_set_header X-Forwarded-Proto $scheme;
  68. }
  69. location /merchant {
  70. root $folder_name;
  71. autoindex on;
  72. index index.html index.htm index.php;
  73. try_files $uri $uri/ /merchant/index.html;
  74. }
  75. location ~ /mobile/[/\w]+\.php$ {
  76. root $folder_name;
  77. fastcgi_pass docker.hostip:9100;
  78. fastcgi_index index.php;
  79. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  80. include fastcgi_params;
  81. }
  82. location ~ /racc/[/\w]+\.php$ {
  83. root $folder_name;
  84. fastcgi_pass docker.hostip:9101;
  85. fastcgi_index index.php;
  86. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  87. include fastcgi_params;
  88. }
  89. location ~ /mobile/[/\w]+\.html$ {
  90. try_files $uri $uri/ /mobile/index.html;
  91. }
  92. location ~ \.php$ {
  93. add_header Cache-Control no-store;
  94. root $folder_name;
  95. fastcgi_pass docker.hostip:9000;
  96. fastcgi_index index.php;
  97. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  98. include fastcgi_params;
  99. }
  100. }
  101. server {
  102. listen 443 ssl;
  103. server_name lzkj168.cn;
  104. return 301 https://www.lzkj168.cn$request_uri;
  105. }
  106. }