네트워크
nginx express 연동
cghun
2021. 7. 6. 14:27
cd /etc/nginx/sites-enabled
sudo vi default
server {
listen 80;
listen [::]:80;
access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;
location / {
proxy_pass http://127.0.0.1:3000;
}
}
esc -> :wq
확인
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
<정상>
nginx 재부팅
sudo service nginx restart
참고 사이트