不只一种原因,可能是java代码返回405,也可能是nginx配置有问题。

nginx中的配置问题

去掉如下配置问题解决:

location /api/user/query {root html;index index.html index.htm;try_files $uri $uri/ @userRoute;
}

nginx中已有的其他配置:

location /api {root html;index       index.html index.htm;try_files $uri $uri/ @apiRoute;
}
location @apiRoute {rewrite ^/(.*) /api/index.html break;
}

405 not allowed 问题排查相关推荐

  1. 【nginx】405 not allowed问题解决方法

    目录 一.问题描述 二.问题原因 三.解决办法(三种) (1)将405错误指向成功(我采用的这种方法解决的问题) (2)修改nginx下src/http/modules/ngx_http_static ...

  2. nginx 405 not allowed问题的解决

    nginx 405 not allowed问题的解决 参考文章: (1)nginx 405 not allowed问题的解决 (2)https://www.cnblogs.com/mingaixin/ ...

  3. Nginx的405 not allowed错误解决

    1.首先看到的页面是nginx返回的页面,得知错误要从nginx上来解决 <html> <head><title>405 Not Allowed</title ...

  4. nginx 响应服务器静态,405 Not Allowed,nginx静态文件响应post请求

    说明: nginx不允许向静态文件提交post方式的请求,否则会返回"HTTP/1.1 405 Method not allowed"错误,至于原来还没去研究.显示如下 ``` [ ...

  5. 405 宝塔钩子_点击数据库管理,nginx提示出现405 Not Allowed错误,是怎么回事?

    许多购买VPS自己建网站的用户都选择使用宝塔面板来安装网站环境,今天给一网友安装网站的时候,宝塔面板添加网站后访问phpmyadmin后台报错,提示"405 not allowed" ...

  6. php 405 not allowed,html nginx 405 not allowed问题的解决

    Apache.IIS.Nginx等绝大多数web服务器,都不允许静态文件响应POST请求,否则会返回"HTTP/1.1 405 Method not allowed"错误. 例1: ...

  7. post请求html405,nginx静态文件响应post请求,405 Not Allowed

    说明: nginx不允许向静态文件提交post方式的请求,否则会返回"HTTP/1.1 405 Method not allowed"错误,至于原来还没去研究.显示如下 [root ...

  8. Nginx 静态页面POST 请求提示405 Not Allowed

    从git上cp了一个开源的前端框架lay Ajax版本,用Nginx配置访问首页没问题 nginx配置如下: server{listen 80;server_name adminhtml.com;in ...

  9. nginx: 405 not allowed问题解决方法

    问题 正常访问Http接口时正常,但通过nginx访问却出现405 not allowed的提示. 解决方案 在nginx的站点配置中添加以下error_page 405 =200  $request ...

  10. 一篇快速解决Nginx Post请求405 (Not Allowed)异常的方案

    原因在上一篇提到Failed to load resource: the server responded with a status of 405 (Not Allowed) 少说话上代码: ``` ...

最新文章

  1. okhttp通过post发送Json数据到php 更新数据库
  2. 一种生成不重复数的算法
  3. Android Studio错误代码汇总
  4. Python中sort与sorted函数
  5. java卡片布局源码_Java编程使用卡片布局管理器示例【基于swing组件】
  6. LeetCode 423. 从英文中重建数字(找规律)
  7. android onclick方法吗,Android中button的onClick事件几种方法
  8. loadrunner11完整卸载
  9. 手机下载Python_将安卓手机打造成 Python 全栈开发利器
  10. C语言 FileStreaming(文件流)
  11. 你的Redis集群撑得住吗?
  12. MDaemon日志报错:550 aa@*.com must check for new mail first
  13. 信贷违约风险预测(四)TrAiNiNG MoDeL
  14. jetbrains goland配置go开发环境
  15. [徐培成系列实战课程]-docker篇-前序
  16. 条件概率,乘法公式——概率论与数理统计(宋浩)
  17. signature=6bac8596b91cba298303e9d5c86a608f,2019年武汉市中考英语试题
  18. 使用Comparator.comparing根据类的属性对list进行排序
  19. 麒麟服务器系统编译raid驱动
  20. 【Ruby on Rails全栈课程】3.7 邮件发送(SendCloud、MailGun)

热门文章

  1. Android性能优化系列:内存优化
  2. html5一个圆圈旋转,Javascript实现可旋转的圆圈实例代码
  3. oracle语句报错 * ERROR at line 2: ORA-00923: FROM keyword not found where expected
  4. 为Linux安装CHM阅读器
  5. 寻求销售团队合作_怎么去寻找销售团队?
  6. 读书笔记(十二)--穷爸爸,富爸爸
  7. C 通过四个点计算两条直线的交点
  8. 项目启动报错:Caused by: com.atomikos.recovery.LogException: Log already in use? tmlog in ./
  9. c语言ifi=1 2,第1部分_C语言程序设计练习一全解.doc
  10. 公众号引流好困难,这个病该怎么治?