본문 바로가기

IT

nginx nuxt 연동, conf 설정 방법

반응형

/etc/nginx/conf.d로 이동 한뒤 자신만의 *.conf 파일을 만들자(ex: your_service.conf, 확장자가conf 이면 nginx가 알아서 불러온다.)

 

upstream simple-app {

           server                                                 0.0.0.0:3000;

           keepalive                                           1024;

           keepalive                                           1024;

           keepalive_timeout                                120;

}

 

server {

 

           listen                                                          80;

           server_name                                                 ip 혹은 도메인

          

           access_log                                                   /var/log/nginx/access_log

           error_log                                                     /var/log/nginx/error.log

          

          

           location / {

          

                                proxy_redirect                                                                                          off;

                                proxy_set_header Host                                                          $host;

                                proxy_set_header X-Real-IP                                                     $remote_addr;

                                proxy_set_header X-Forwarded-Forwarded             $proxy_add_x_forwarded_for;

                                proxy_set_header X-Forwarded-Proto                              $scheme;

                               

                               

                               

                                proxy_pass                             http://127.0.0.1    #연결시킬 서버

                    

          

          

          

          

          

           }

}

'IT' 카테고리의 다른 글

jenkins, aws 이용방법  (0) 2021.02.25
javascript google translate 안뜨게 하는법  (0) 2021.02.18
no live upstreams while connecting to upstream,  (0) 2021.02.05
무료 목업(Powermockup)  (0) 2020.10.18
윈도우 레디스 설치 실행 중지  (0) 2020.09.20