Nginx proxy_패스 에이전트 메모

876 단어 nginxproxy_pass
Nginx proxy_패스 에이전트 메모
        #     /,        /pma/foo/bar       /pma/foo/bar
        #      ,     URI    URI
        location /pma/ {
        	# proxy_redirect off;
        	proxy_pass http://127.0.0.1:80;
        	proxy_set_header Host $host:$server_port;
        	proxy_set_header X-Real-IP $remote_addr;
            	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

	#        ,     /abc       /def
	#    /, URI  /abc/   ,   (this/abc)/foo/bar     (that/def)/foo/bar
	#       URI : /def/foo/bar
        #      Apache   ,         Rewritebase /def
	location /abc/ {
        	# proxy_redirect off;
        	proxy_pass http://127.0.0.1:80/def/;
        	proxy_set_header Host $host:$server_port;
        	proxy_set_header X-Real-IP $remote_addr;
            	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

좋은 웹페이지 즐겨찾기