nginx-xyz-https.conf 3.1 KB

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