adweb3.conf 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. map $http_upgrade $connection_upgrade {
  2. default upgrade;
  3. 'websocket' upgrade;
  4. }
  5. server {
  6. listen 80;
  7. listen 443 ssl;
  8. server_name v3.adwebcloud.com zhigeng.adwebcloud.com;
  9. # 日志地址
  10. access_log /var/log/nginx/access.log;
  11. error_log /var/log/nginx/error.log;
  12. ssl_certificate /root/.acme.sh/v3.adwebcloud.com_ecc/fullchain.cer;
  13. ssl_certificate_key /root/.acme.sh/v3.adwebcloud.com_ecc/v3.adwebcloud.com.key;
  14. include /etc/nginx/conf.d/adweb3/*.conf;
  15. index index.html;
  16. root /home/ubuntu/adweb3-web/dist; # 这里改成前端静态
  17. location / {
  18. try_files $uri $uri/ /index.html;
  19. # 后端 API 的转发
  20. location /adweb3/ {
  21. proxy_set_header Upgrade $http_upgrade;
  22. proxy_set_header Connection $connection_upgrade;
  23. proxy_pass http://127.0.0.1:8080;
  24. }
  25. location /adweb3/websocket/ {
  26. proxy_pass http://127.0.0.1:8080/adweb3/websocket/;
  27. proxy_http_version 1.1;
  28. proxy_set_header Upgrade $http_upgrade;
  29. proxy_set_header Connection "Upgrade";
  30. proxy_set_header X-real-ip $remote_addr;
  31. proxy_set_header X-Forwarded-For $remote_addr;
  32. }
  33. }
  34. }
  35. server {
  36. listen 80;
  37. listen 443 ssl;
  38. server_name v3.sohoeb2b.com;
  39. # 日志地址
  40. access_log /var/log/nginx/access.log;
  41. error_log /var/log/nginx/error.log;
  42. ssl_certificate /etc/nginx/conf.d/ssl/v3.sohoeb2b.com.pem;
  43. ssl_certificate_key /etc/nginx/conf.d/ssl/v3.sohoeb2b.com.key;
  44. include /etc/nginx/conf.d/adweb3/*.conf;
  45. index index.html;
  46. root /home/ubuntu/adweb3-web/dist; # 这里改成前端静态
  47. location / {
  48. try_files $uri $uri/ /index.html;
  49. # 后端 API 的转发
  50. location /adweb3/ {
  51. proxy_set_header Upgrade $http_upgrade;
  52. proxy_set_header Connection $connection_upgrade;
  53. proxy_pass http://127.0.0.1:8080;
  54. }
  55. location /adweb3/websocket/ {
  56. proxy_pass http://127.0.0.1:8080/adweb3/websocket/;
  57. proxy_http_version 1.1;
  58. proxy_set_header Upgrade $http_upgrade;
  59. proxy_set_header Connection "Upgrade";
  60. proxy_set_header X-real-ip $remote_addr;
  61. proxy_set_header X-Forwarded-For $remote_addr;
  62. }
  63. }
  64. }
  65. server {
  66. listen 80;
  67. server_name xxl-job.v3.adwebcloud.com;
  68. # 日志地址
  69. access_log /var/log/nginx/access.log;
  70. error_log /var/log/nginx/error.log;
  71. location / {
  72. # 后端 API 的转发
  73. location / {
  74. proxy_set_header Upgrade $http_upgrade;
  75. proxy_set_header Connection $connection_upgrade;
  76. proxy_pass http://127.0.0.1:8090;
  77. }
  78. }
  79. }