nginx返回json.txt 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. server
  2. {
  3. listen 80 default_server;
  4. server_name www.jianjieshenghuo.com jianjieshenghuo.com;
  5. index success.json;
  6. root /www/wwwroot/403;
  7. location ~ ^/json {
  8. default_type application/json;
  9. return 200 '{
  10. "code": 0,
  11. "msg": "交易成功",
  12. "data": {
  13. "userId": 7923091928358969344,
  14. "account": "13684998852",
  15. "password": null,
  16. "userName": "aa}}a",
  17. "userType": 2,
  18. "idCard": "440981199105062233",
  19. "userStatus": null,
  20. "isDelete": null,
  21. "createTime": null,
  22. "updateTime": null,
  23. "sex": 0,
  24. "address": null,
  25. "email": null,
  26. "transHash": null,
  27. "userAccount": {
  28. "userId": null,
  29. "realName": "aa}}a",
  30. "bankAccount": "",
  31. "bankName": null,
  32. "bankBranch": null,
  33. "balance": null,
  34. "points": null,
  35. "userCredit": null,
  36. "version": null,
  37. "createTime": null,
  38. "updateTime": null,
  39. "pubKey": null,
  40. "priKey": null
  41. },
  42. "userRealPrincipal": null
  43. }
  44. }';
  45. }
  46. #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
  47. #error_page 404/404.html;
  48. #SSL-END
  49. #ERROR-PAGE-START 错误页配置,可以注释、删除或修改
  50. #error_page 404 /404.html;
  51. #error_page 502 /502.html;
  52. #ERROR-PAGE-END
  53. #PHP-INFO-START PHP引用配置,可以注释或修改
  54. include enable-php-00.conf;
  55. #PHP-INFO-END
  56. #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效
  57. include /www/server/panel/vhost/rewrite/403.com.conf;
  58. #REWRITE-END
  59. #禁止访问的文件或目录
  60. location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
  61. {
  62. return 404;
  63. }
  64. #一键申请SSL证书验证目录相关设置
  65. location ~ \.well-known{
  66. allow all;
  67. }
  68. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  69. {
  70. expires 30d;
  71. error_log off;
  72. access_log /dev/null;
  73. }
  74. location ~ .*\.(js|css)?$
  75. {
  76. expires 12h;
  77. error_log off;
  78. access_log /dev/null;
  79. }
  80. access_log /www/wwwlogs/403.com.log;
  81. error_log /www/wwwlogs/403.com.error.log;
  82. }