2017-05-04 3 views
0

을 통과 :방법의 nginx 위치에 모두의 sitemap.xml과 sitemap.xml.gz 일치하고 모두 <code>sitemap.xml</code> 및 <code>sitemap.xml.gz</code>이뿐만 아니라 proxy_pass하는 경기를 반환 일치 얼마나의 nginx에서

location ~ ^/sitemap.(xml|xml\.gz); 
    proxy_pass: "http://localhost/sitemap/sitemap.$1" 

에만 sitemap.xml 일치 하지sitemap.xml.gz

EDIT 1

location ~ ^/sitemap.(.*)$; 
    proxy_pass: "http://localhost/sitemap/sitemap.$1" 
,

일치 항목은 sitemap.xmlsitemap.xml.gz에서 200을 반환하지만 다른 원치 않는 요청도 프록시에서 전달하려고합니다.

location ~ ^/sitemap.(xml|xml\.gz)$ 
    proxy_pass: "http://localhost/sitemap/sitemap.$1" 
:

답변

0

내 문제에 응답