zoukankan      html  css  js  c++  java
  • 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;
        }
    
    }
    
  • 相关阅读:
    leetcode167 Two Sum II
    leetcode18 4Sum
    leetcode15 three sum
    leetcode-1-Two Sum
    SQL优化——select
    Hadoop 集群搭建
    虚拟机中的两台主机怎么相互拷贝文件
    doker5
    docker4
    docker3
  • 原文地址:https://www.cnblogs.com/Csir/p/8025759.html
Copyright © 2011-2022 走看看