Nginx 디렉토리 인식 설정

2020. 12. 28. 13:48linux

 location ~ ^/디렉토리명(.*)$ {
        rewrite ^/디렉토리명(.*) /$1 break;
        resolver 192.168.200.1;
        proxy_pass $scheme://$server_name:30080;
        proxy_set_header X-Real-IP $remote_addr; # 실제 접속자의 IP를 X-Real-IP 헤더에 입혀서 전송.
        proxy_redirect off;
 }