1223v

ec2 설정 본문

개발

ec2 설정

1223v 2022. 8. 23. 01:48

경로 빌드 하고 chmod로 폴더 권한 풀고, 

sudo ln -s /etc/nginx/sites-available/myapp.conf /etc/nginx/sites-enabled/myapp.conf

 

그리고 다시 /etc/nginx.conf 를 켜서 심볼릭링크를 추가해주자.

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*.conf; ==> 이 줄
#    server {
#        listen       80;
#        listen       [::]:80;
#        server_name  _;
#        root         /usr/share/nginx/html;

nginx 를 재구동하자.

sudo nginx -t
sudo service nginx restart

그러면 우리가 설정한 React 프로젝트가 브라우저에 잘 띄워질 것이다.

React를 Nginx웹 서버에 배포하기 | Hanumoka, IT Blog

728x90