nginx反向代理去除虛擬目錄路徑名

location ^~ /myqpp {
   rewrite ^/myapp/(.*)$ /$1 break;
   proxy_pass http://127.0.0.1:8080;
   proxy_set_header X-Forwarded-Proto $scheme;
   proxy_set_header Host $http_host;
   proxy_set_header X-Real-IP $remote_addr;
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章