点击网站选择设置-》配置文件,然后在里面添加

  location /api/ //api时前端配置代理时用到的名字,(vue项目中,vue.config.js中配置的)
    {
        proxy_pass "http://ww.baidu.com/"; //替换成自己的域名地址
         proxy_set_header X-Forwarded-For $remote_addr;
    }

宝塔面板配置服务器代理

相关文章:

  • 2021-11-28
  • 2021-08-26
  • 2022-12-23
  • 2021-08-01
  • 2021-10-05
  • 2021-09-08
  • 2021-05-10
  • 2021-05-24
猜你喜欢
  • 2021-05-10
  • 2021-12-01
  • 2022-12-23
  • 2021-11-12
  • 2021-12-02
  • 2021-07-11
  • 2022-12-23
相关资源
相似解决方案