리자

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

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

https://www.youtube.com/watch?v=ryoLV3juTOc

 

 

영상 순서

0. ngixn 설정과 관련된 이전 영상을 참고해 주세요.
    https://youtu.be/elPmCNeOlsc

 

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년 전 조회 776
1년 전 조회 585
1년 전 조회 582
1년 전 조회 904
1년 전 조회 567
1년 전 조회 914
1년 전 조회 1,993
1년 전 조회 2,845
1년 전 조회 1,632
1년 전 조회 2,587
1년 전 조회 1,257
1년 전 조회 1,797
2년 전 조회 2,384
2년 전 조회 781
2년 전 조회 1,321
2년 전 조회 1,147
2년 전 조회 1,384
2년 전 조회 1,052
2년 전 조회 950
2년 전 조회 1,181
2년 전 조회 869
2년 전 조회 1,286
2년 전 조회 792
2년 전 조회 647
2년 전 조회 1,163
2년 전 조회 1,240
2년 전 조회 799
2년 전 조회 1,291
2년 전 조회 897
2년 전 조회 1,858