default.conf 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name localhost;
  5. resolver 8.8.8.8;
  6. #access_log /var/log/nginx/host.access.log main;
  7. location / {
  8. root /usr/share/nginx/html;
  9. index index.html index.htm;
  10. }
  11. set $stg_token "C1qziFGlIv3tnCQxcFaStrLuZOO2ZZXjN7FB_G0WlrOLjclfObbSaXAKzl4RWwQBf_0Zhsm0CoVvdVsYMD18iM_LJrxtn7LHJJQuF9UoUuF3fvqOwrG4EF6Z4GahtxtQ2oeaPQBBNKlgVW1xUW7tkhEdXWqzDHPA_I_91Lczk0PI4guhx1c88Hst4-HI8pdMbiUdEJzj3d3a2W06Fa0XA9Q0taAwaRd1k9jUrDVyj9GfS84_SIgJF4SPjWVfsraV79ieb_StgRcUwZjbscGPMlifnJD6F00wwNbxG7AuCHbl3EtMfSed1vuVx3AsizIckwzIVSVRpOGw72cdAMui-I6es9Ozj2ITzSa5KgyXEpX4qCHF1VcCM1wlHLQ_5hLnJIi4r8NsnJPsxMYrTw";
  12. set $prd_token "2g4pgi27kWjPBjaKoHSfZAyfOJxuuEthWY1mk9tUbyPSrr6sn_6aPGaTxT7_ldXoKIJuMt8C7V636_jIq6fzaSfqIj8OQyhUPKPMa2eZjLlblT77ySqBt_lYM6iEAhrj7-raGmySMmkLS4Rqh651Ak2tqmUbjS64cqv5ofMsuadOCg1J-CtLFt7NeSoU4N3Kpm5MJ_4sOFBhQGfBym88dcwxosFl9LbvhpyleXFf6fOZkkOj0l2X8Nr2pfNjYs3_VOmCQxrxXh1XZ_a1v9qj5_rA9k9wGNNQfmr2JwJTUT4V9NwtNq94gNFt8C0J6MWKRHvYyb2XRkaCnEKu8QiNElcIwU9l9azouu5Lc3uafG1dd98yFm9I784oNWvIpVjUrsTkFiJxNGTz";
  13. location /openapi-stg/ {
  14. rewrite ^/openapi-stg/(.*)$ /$1 break;
  15. proxy_pass https://fls-ai-stg-sit.pingan.com.cn/openapi$uri?token=$stg_token&channelId=ASP-TEST&sceneId=ASP-TEST&$args;
  16. proxy_set_header Host $host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19. }
  20. location /openapi-prd/ {
  21. rewrite ^/openapi-prd/(.*)$ /$1 break;
  22. proxy_pass https://fls-ai.pingan.com.cn/openapi$uri?token=$prd_token&channelId=ASP-TEST&sceneId=ASP-TEST&$args;
  23. proxy_set_header Host $host;
  24. proxy_set_header X-Real-IP $remote_addr;
  25. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  26. }
  27. #error_page 404 /404.html;
  28. # redirect server error pages to the static page /50x.html
  29. #
  30. error_page 500 502 503 504 /50x.html;
  31. location = /50x.html {
  32. root /usr/share/nginx/html;
  33. }
  34. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  35. #
  36. #location ~ \.php$ {
  37. # proxy_pass http://127.0.0.1;
  38. #}
  39. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  40. #
  41. #location ~ \.php$ {
  42. # root html;
  43. # fastcgi_pass 127.0.0.1:9000;
  44. # fastcgi_index index.php;
  45. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  46. # include fastcgi_params;
  47. #}
  48. # deny access to .htaccess files, if Apache's document root
  49. # concurs with nginx's one
  50. #
  51. #location ~ /\.ht {
  52. # deny all;
  53. #}
  54. }