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.

179 lines
5.6 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  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. sendfile on;
  14. keepalive_timeout 65;
  15. server {
  16. listen 80;
  17. server_name www.iflytop.com;
  18. #charset koi8-r;
  19. #access_log logs/host.access.log main;
  20. location / {
  21. root apps/pc/dist;
  22. try_files $uri $uri/ /index.html;
  23. index index.html index.htm;
  24. }
  25. location /mobile {
  26. alias apps/mobile/dist;
  27. index index.html index.htm;
  28. try_files $uri $uri/ /mobile/index.html;
  29. }
  30. location /pc/design {
  31. alias apps/pc/design/dist;
  32. index index.html index.htm;
  33. try_files $uri $uri/ /pc/design/index.html;
  34. }
  35. location /pc/hardware {
  36. alias apps/pc/hardware/dist;
  37. index index.html index.htm;
  38. try_files $uri $uri/ /pc/hardware/index.html;
  39. }
  40. location /pc/metal {
  41. alias apps/pc/metal/dist;
  42. index index.html index.htm;
  43. try_files $uri $uri/ /pc/metal/index.html;
  44. }
  45. location /zsjyapi/ {
  46. proxy_pass http://localhost:8080/zsjyapi/;
  47. proxy_set_header Host $host;
  48. proxy_set_header X-Real-IP $remote_addr;
  49. }
  50. location /test_result_image/ {
  51. proxy_pass http://localhost:8080/test_result_image/;
  52. proxy_set_header Host $host;
  53. proxy_set_header X-Real-IP $remote_addr;
  54. }
  55. #error_page 404 /404.html;
  56. # redirect server error pages to the static page /50x.html
  57. #
  58. error_page 500 502 503 504 /50x.html;
  59. location = /50x.html {
  60. root html;
  61. }
  62. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  63. #
  64. #location ~ \.php$ {
  65. # proxy_pass http://127.0.0.1;
  66. #}
  67. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  68. #
  69. #location ~ \.php$ {
  70. # root html;
  71. # fastcgi_pass 127.0.0.1:9000;
  72. # fastcgi_index index.php;
  73. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  74. # include fastcgi_params;
  75. #}
  76. # deny access to .htaccess files, if Apache's document root
  77. # concurs with nginx's one
  78. #
  79. #location ~ /\.ht {
  80. # deny all;
  81. #}
  82. }
  83. # another virtual host using mix of IP-, name-, and port-based configuration
  84. #
  85. server {
  86. listen 80;
  87. server_name www.hjyd88.com;
  88. location / {
  89. root apps/hjyd/dist;
  90. if ( $http_user_agent ~ "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT-)|(SonyEricsson)|(NEC-)|(Alcatel)|(Ericsson)|(BENQ)|(BenQ)|(Amoisonic)|(Amoi-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(Bird)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(Daxian)|(DAXIAN)|(DBTEL)|(Eastcom)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC-)|(SED-)|(EMOL-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Wget)|(Java)|(curl)|(Opera)" ) {
  91. root apps/mobile-hjyd/dist;
  92. }
  93. index index.html index.htm;
  94. }
  95. }
  96. # HTTPS server
  97. #
  98. server {
  99. listen 443 ssl;
  100. server_name www.iflytop.com;
  101. # ssl on;
  102. ssl_certificate D:\website_key\www.iflytop.com.pem;
  103. ssl_certificate_key D:\website_key\www.iflytop.com.key;
  104. ssl_session_cache shared:SSL:1m;
  105. ssl_session_timeout 5m;
  106. #自定义设置使用的TLS协议的类型以及加密套件(以下为配置示例,请您自行评估是否需要配置)
  107. #TLS协议版本越高,HTTPS通信的安全性越高,但是相较于低版本TLS协议,高版本TLS协议对浏览器的兼容性较差。
  108. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  109. ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
  110. #表示优先使用服务端加密套件。默认开启
  111. ssl_prefer_server_ciphers on;
  112. location / {
  113. root apps/pc/dist;
  114. try_files $uri $uri/ /index.html;
  115. index index.html index.htm;
  116. }
  117. location /mobile {
  118. alias apps/mobile/dist;
  119. index index.html index.htm;
  120. try_files $uri $uri/ /mobile/index.html;
  121. }
  122. location /pc/design {
  123. alias apps/pc/design/dist;
  124. index index.html index.htm;
  125. try_files $uri $uri/ /pc/design/index.html;
  126. }
  127. location /pc/hardware {
  128. alias apps/pc/hardware/dist;
  129. index index.html index.htm;
  130. try_files $uri $uri/ /pc/hardware/index.html;
  131. }
  132. location /pc/metal {
  133. alias apps/pc/metal/dist;
  134. index index.html index.htm;
  135. try_files $uri $uri/ /pc/metal/index.html;
  136. }
  137. location /zsjyapi/ {
  138. proxy_pass http://localhost:8080/zsjyapi/;
  139. proxy_set_header Host $host;
  140. proxy_set_header X-Real-IP $remote_addr;
  141. }
  142. location /test_result_image/ {
  143. proxy_pass http://localhost:8080/test_result_image/;
  144. proxy_set_header Host $host;
  145. proxy_set_header X-Real-IP $remote_addr;
  146. }
  147. }
  148. }