본문 바로가기
개발/Nginx

nginx proxy 설정

by 꾸르배 2021. 11. 2.

1. nginx install

sudo apt-get install nginx

2. check nginx version

nginx -v

=> nginx version: nginx/1.18.0 (Ubuntu)

3. config file path check

sudo find / -name nginx.conf

=> /etc/nginx/nginx.conf

 

4. move to conf file

cd /etc/nginx

 

5. added conf file to site-available

sudo vim node-server

server {

  listen 80;

  server_name 111.111.111.111;

  location / {

    proxy_pass http://127.0.0.1:65535;

  }

}

 

6. move to enable folder

sudo ln -s /etc/nginx/sites-available/sgt-wallet-server /etc/nginx/sites-enabled

 

7. nginx start

sudo service nginx start