开发阶段,前端的服务器是localhost:8080,后端服务器是localhost:8088,涉及跨域,所以用nginx做反向代理使http://localhost:8080/api开头的http请求都转变成http://localhost:8088/api,nginx配置如下
结果一直是404
用postman测试后端接口,显示正常
查看任务管理器,nginx处于运行状态
nginx的访问日志无记录,错误日志也无记录,以下为错误日志最后的内容
不知道到底是哪里出了问题
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你那个server_name 不是127.0.0.1吗?
localhost不一定就代表127.0.0.1吧?