search

Home  >  Q&A  >  body text

Has anyone encountered nginx as a proxy, the get request is valid, and the post request is 404

I use nginx as a proxy, and the back-end server is tomcat. I wrote two server blocks to proxy to two projects in tomcat. The first server block listens to port 80 and adds default. Everything is normal. The second server block listens to port 80 and adds default. A server acts as a proxy for another project. The get request is normal, but the ajax post request reports 404. As a note, I am using Alibaba Cloud's Ubuntu image, and nginx is version 1.6. It's sent from a mobile phone now, and there is no screenshot of the code.

伊谢尔伦伊谢尔伦2755 days ago505

reply all(4)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 17:15:08

    nginx does not restrict http methods by default, right?
    Have you checked the java program? Is it possible that there are restrictions in the program?

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 17:15:08

    Visual inspection is not caused by nginx

    reply
    0
  • 迷茫

    迷茫2017-05-16 17:15:08

    I have the same question, get is valid, post becomes get

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-16 17:15:08

    I’ve also encountered this, what’s the reason?

    reply
    0
  • Cancelreply