server {
listen 80;
server_name webisfree.com
root /var/www/webisfree.com/
index index.html index.htm
...
}
server {
listen 80;
server_name abcde.com
root /var/www/abcde.com
index index.html index.htm
...
}
server {
listen 80;
location /other/ {
proxy_pass http://127.0.0.1:3003/;
}
}
server {
listen 80;
root /home/ialy/playground/build;
index index.html;
location /eng2music {
alias /home/ialy/eng2music/build;
sub_filter static/js/ eng2music/static/js/;
sub_filter static/css/ eng2music/static/css/;
sub_filter static/media/ eng2music/static/media/;
}
}
설정을 바꾼 후 restart 잊지 않기
sudo service nginx restart
문제가 생겼는지 확인하기
systemctl status nginx.service
위 결과로 active(running)이 나와야 성공한 것
출처::
https://webisfree.com/2018-01-06/nginx%EB%A5%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC-%EB%A9%80%ED%8B%B0-%EB%8F%84%EB%A9%94%EC%9D%B8-%EC%97%B0%EA%B2%B0%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95
https://zionh.tistory.com/20
https://ialy1595.github.io/post/nginx-publish-in-same-domain/