nginx.conf 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. #user nobody;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. #pid logs/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. # '$status $body_bytes_sent "$http_referer" '
  15. # '"$http_user_agent" "$http_x_forwarded_for"';
  16. #access_log logs/access.log main;
  17. sendfile on;
  18. #tcp_nopush on;
  19. #keepalive_timeout 0;
  20. keepalive_timeout 65;
  21. #gzip on;
  22. server {
  23. listen 8080 ssl;
  24. server_name hmedi02.net;
  25. ssl_certificate C://env//nginx-1.16.1//keys//3629753_hmedi02.net.pem; # 这个是证书的crt文件所在目录
  26. ssl_certificate_key C://env//nginx-1.16.1//keys//3629753_hmedi02.net.key; # 这个是证书key文件所在目录
  27. ssl_session_cache shared:SSL:1m;
  28. ssl_session_timeout 5m;
  29. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  30. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  31. ssl_prefer_server_ciphers on;
  32. #charset koi8-r;
  33. #access_log logs/host.access.log main;
  34. location / {
  35. proxy_set_header X-Real-IP $remote_addr;
  36. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  37. proxy_set_header Host $http_host;
  38. proxy_set_header X-NginX-Proxy true;
  39. proxy_set_header Connection "";
  40. proxy_http_version 1.1;
  41. proxy_pass http://localhost:8081;
  42. client_max_body_size 20m;
  43. }
  44. location /ui/ {
  45. proxy_set_header X-Real-IP $remote_addr;
  46. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  47. proxy_set_header Host $http_host;
  48. proxy_set_header X-NginX-Proxy true;
  49. proxy_set_header Connection "";
  50. proxy_http_version 1.1;
  51. proxy_pass http://localhost:8989;
  52. }
  53. location /nutzwk/ {
  54. proxy_set_header X-Real-IP $remote_addr;
  55. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  56. proxy_set_header Host $http_host;
  57. proxy_set_header X-NginX-Proxy true;
  58. proxy_set_header Connection "";
  59. proxy_http_version 1.1;
  60. proxy_pass http://localhost:18081;
  61. client_max_body_size 20m;
  62. }
  63. location /qiangxian/ {
  64. proxy_set_header X-Real-IP $remote_addr;
  65. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  66. proxy_set_header Host $http_host;
  67. proxy_set_header X-NginX-Proxy true;
  68. proxy_set_header Connection "";
  69. proxy_http_version 1.1;
  70. proxy_pass http://localhost:18181;
  71. client_max_body_size 20m;
  72. }
  73. location /qxdaping/ {
  74. proxy_set_header X-Real-IP $remote_addr;
  75. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  76. proxy_set_header Host $http_host;
  77. proxy_set_header X-NginX-Proxy true;
  78. proxy_set_header Connection "";
  79. proxy_http_version 1.1;
  80. proxy_pass http://localhost:10890;
  81. client_max_body_size 20m;
  82. }
  83. location /iserver/ {
  84. proxy_set_header X-Real-IP $remote_addr;
  85. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  86. proxy_set_header Host $http_host;
  87. proxy_set_header X-NginX-Proxy true;
  88. proxy_set_header Connection "";
  89. proxy_http_version 1.1;
  90. proxy_pass http://192.168.3.228:8090/iserver/;
  91. client_max_body_size 20m;
  92. }
  93. #error_page 404 /404.html;
  94. # redirect server error pages to the static page /50x.html
  95. #
  96. error_page 500 502 503 504 /50x.html;
  97. location = /50x.html {
  98. root html;
  99. }
  100. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  101. #
  102. #location ~ \.php$ {
  103. # proxy_pass http://127.0.0.1;
  104. #}
  105. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  106. #
  107. #location ~ \.php$ {
  108. # root html;
  109. # fastcgi_pass 127.0.0.1:9000;
  110. # fastcgi_index index.php;
  111. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  112. # include fastcgi_params;
  113. #}
  114. # deny access to .htaccess files, if Apache's document root
  115. # concurs with nginx's one
  116. #
  117. #location ~ /\.ht {
  118. # deny all;
  119. #}
  120. }
  121. # another virtual host using mix of IP-, name-, and port-based configuration
  122. #
  123. #server {
  124. # listen 8000;
  125. # listen somename:8080;
  126. # server_name somename alias another.alias;
  127. # location /ui-master/ {
  128. # root html/ui-master;
  129. # index index.html index.htm;
  130. # }
  131. #}
  132. # HTTPS server
  133. #
  134. #server {
  135. # listen 443 ssl;
  136. # server_name localhost;
  137. # ssl_certificate cert.pem;
  138. # ssl_certificate_key cert.key;
  139. # ssl_session_cache shared:SSL:1m;
  140. # ssl_session_timeout 5m;
  141. # ssl_ciphers HIGH:!aNULL:!MD5;
  142. # ssl_prefer_server_ciphers on;
  143. # location / {
  144. # root html;
  145. # index index.html index.htm;
  146. # }
  147. #}
  148. }