1. 程式人生 > >nginx發送post請求報405的問題

nginx發送post請求報405的問題

all ron .com AD get try_files 請求 body span

[root@elk-server meeting-order]# curl -X POST https://test.abc.com/
<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>
[root@elk
-server meeting-order]#

nginx配置加上如下代碼

location / {
            error_page 405 =200 /index.html;
            try_files $uri $uri/ /index.html;
        }

再次發送POST請求,返回的和GET請求一樣了

nginx發送post請求報405的問題