server {
  listen 8111;
  server_name talebook_proxy;

  location / {
    # Nginx 的主机地址
    proxy_set_header Host $http_host;
    # 用户的真是IP 如果不配置这个,用户的真实IP将会被忽略,拿到的就是Nginx的IP
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


    proxy_pass http://localhost:8120;

  }

  

  location /bl {
    # Nginx 的主机地址
    proxy_set_header Host $http_host;
    # 用户的真是IP 如果不配置这个,用户的真实IP将会被忽略,拿到的就是Nginx的IP
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

  
    proxy_pass http://localhost:8120/api/admin/book/list?page=1&sort=id&desc=true&num=100&search=;

  }

}

![[image-20230815230839384.png]]

![[image-20230815232422577.png]]
![[image-20230815232533654.png]]