- 설정파일(nginx.conf) 변경
- 위치 : /etc/nginx/nginx.conf

- 설정파일에 /etc/nginx/conf.d/*.conf가 include되어있기 때문에 확장자가 .conf인 파일을 생성하여 설정하면 된다.
3.1 : /etc/nginx/conf.d/proxy.conf

server { #서버블록
listen 80; #80포트로 들어오는 HTTP요청 수신
server_name ; #Nginx가 설치된 컴퓨터의 ip : server_name 3.38.209.232;
location / { # URL 경로의 처리 /
proxy_pass ; # URL을 처리할 WAS의 주소(요청을 전달할 서버의 주소)
proxy_set_header Host $host; # Host 헤더(클라이언트가 접근할 호스트의 도메인명,ip주소)의 정보를 WAS에 전달하기 위해 설정
proxy_set_header X-Real-IP $remote_addr; # 접속자의 IP를 WAS로 전달
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}