sudo nano /etc/nginx/conf.d/service-url.inc
로 service-url.inc 파일 생성 후
set $service_url <http://3.36.85.4:8880>
입력하고 저장해 준다.
server {
include /etc/nginx/conf.d/service-url.inc;
root /home/ubuntu/front/dist;
index index.html index.htm index.nginx-debian.html;
server_name www.pasds.world pasds.world; # managed by Certbot
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
}
location /app {
proxy_pass $service_url;
}
include를 통하여 아까 생성한 service-url.inc 파일 넣어주고
service-url.inc 파일 안에 들어있는 $service_url 변수명을 proxy_pass 해준다