리자

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

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

 

 

영상 순서

0. ngixn 설정과 관련된 이전 영상을 참고해 주세요.
   

 

1. uvicorn.service 파일 생성
    cd /etc/systemd/system
    vi uvicorn.service

 

2. uvicorn.service 실행
    systemctl start uvicorn.service
    또는
    systemctl start uvicorn.service

 

3. 시스템 부팅시 설정
    systemctl enable uvicorn.service

 

=끝=


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

 

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

 

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

 

 

 

=================================================================
/etc/systemd/system/uvicorn.service 파일 내용
=================================================================
[Unit]
Description=Uvicorn server with virtual environment
After=network.target

[Service]
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu/g6
Environment="PATH=/home/ubuntu/g6/venv/bin"
ExecStart=/home/ubuntu/g6/venv/bin/uvicorn main:app --host 0.0.0.0 --port 8000

[Install]
WantedBy=multi-user.target
=================================================================

|
댓글을 작성하시려면 로그인이 필요합니다.

그누보드6 팁자료실

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

+
제목 글쓴이 날짜 조회
1년 전 조회 814
1년 전 조회 663
1년 전 조회 657
1년 전 조회 939
1년 전 조회 630
1년 전 조회 954
1년 전 조회 2,058
1년 전 조회 2,945
2년 전 조회 1,757
2년 전 조회 2,728
2년 전 조회 1,350
2년 전 조회 1,899
2년 전 조회 2,538
2년 전 조회 866
2년 전 조회 1,457
2년 전 조회 1,290
2년 전 조회 1,530
2년 전 조회 1,178
2년 전 조회 1,030
2년 전 조회 1,281
2년 전 조회 938
2년 전 조회 1,402
2년 전 조회 915
2년 전 조회 770
2년 전 조회 1,250
2년 전 조회 1,309
2년 전 조회 885
2년 전 조회 1,352
2년 전 조회 1,028
2년 전 조회 1,989