nginx把POST转GET请求解决405问题

405重定向,然后把POST转GET

upstream local {
server 10.0.1.11:81;
} server {
listen 81;
server_name testf.xxx.com; location / {
root /data/f/ROOT/;
index index.html index.htm;
# 解决vue history模式,刷新404问题。
try_files $uri $uri/ /index.html;
} error_page 405 =200 @405;
location @405 {
root /data/f/ROOT/;
proxy_method GET;
proxy_pass http://local/$request_uri;
} location /cashloan/ {
proxy_pass https://testapicashloan.xxx.com; } location /front/ {
proxy_pass https://testapifront.xxx.com;
} access_log /app/logs/f_access.log main;
} server {
listen 80;
server_name testf.xxx.com;
location / {
rewrite ^(.*) https://$server_name$1 permanent;
} }
上一篇:[转]MySQL数据库引擎介绍、区别、创建和性能测试的深入分析


下一篇:Cloudera Manager的安装