우분투 리눅스의 nginx에서 fastapi와 도메인을 연결하는 방법에 대해 설명합니다. #1 > 그누보드6 팁자료실

그누보드6 팁자료실

그누보드6, 파이썬에 대한 팁과 자료를 올려주세요.
그누보드6 실서비스를 위한 웹서버 설정

우분투 리눅스의 nginx에서 fastapi와 도메인을 연결하는 방법에 대해 설명합니다. #1 정보

우분투 리눅스의 nginx에서 fastapi와 도메인을 연결하는 방법에 대해 설명합니다. #1

본문

Describes how to connect fastapi and domains to nginx on Ubuntu Linux

 

https://www.youtube.com/watch?v=elPmCNeOlsc&t=4s

 

 

영상 순서

 

1. fastapi 로 만든 그누보드6 실행
    uvicorn main:app --reload --host 0.0.0.0 --port 8000

 

2. nginx 설치
    sudo apt update
    sudo apt install nginx

 

3. nginx 설정
    server {
        listen 80;
        server_name  your-domain.com;

        location / {
                proxy_pass http://127.0.0.1:8000;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
        }
    }

 

 4. nginx 재실행
    systemctl restart nginx

 

5. dns A 레코드 추가
    A    @    IP주소

 

=끝=


그누보드6 github 저장소
https://github.com/gnuboard/g6

 

그누보드6 사용자데모
https://g6.demo.sir.kr/

 

그누보드6 커뮤니티
https://sir.kr/main/g6/

추천
2

댓글 0개

전체 48 |RSS
그누보드6 팁자료실 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT