웹서버 설정 (APACHE)
g6.gnuboardd.com 도메인을 자신의 도메인 이름으로 변경하여 사용하세요.
(DNS 관리에서 A 레코드가 이 서버의 아이피로 설정이 되어 있어야 합니다.)
[code]
root@sirsoft-235928:/home/ubuntu/g6# apt install apache2
...
Do you want to continue? [Y/n] y
...
No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@sirsoft-235928:/home/ubuntu/g6# cd /etc/apache2/sites-enabled/
root@sirsoft-235928:/etc/apache2/sites-enabled# cp 000-default.conf g6.gnuboard.com.conf
root@sirsoft-235928:/etc/apache2/sites-enabled# vi g6.gnuboard.com.conf
# Apache2 Enable Module 설치
root@sirsoft-235928:/etc/apache2/sites-enabled# a2enmod proxy
root@sirsoft-235928:/etc/apache2/sites-enabled# a2enmod proxy_http
root@sirsoft-235928:/etc/apache2/sites-enabled# a2enmod headers
root@sirsoft-235928:/etc/apache2/sites-enabled# systemctl restart apache2
root@sirsoft-235928:/etc/apache2/sites-enabled# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2024-01-18 14:11:21 KST; 9s ago
[/code]
/etc/apache2/sites-enabled/g6.gnuboard.com.conf
[code]
<VirtualHost *:80>
ServerName g6.gnuboard.com
ServerAdmin account@gnuboard.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# 프록시 설정
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
# 헤더 전달
RequestHeader set X-Real-IP expr=%{REMOTE_ADDR}
RequestHeader set X-Forwarded-For expr=%{REMOTE_ADDR}
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
</VirtualHost>
[/code]
다음글에 이어집니다.
댓글 5개
@리자
맞습니다.3.6이기본인데, 3.8, 3.9, 3.11 을 병렬도 추가 설치가
가능하더군요.
root 로
yum install python39 python39-pip
로 python39를 설치하고,
사용자 아이디로.
python3.9 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
/home/사용자아이디/public_html/g6/venv/bin/python3.9 -m pip install --upgrade pip
uvicorn main:app --reload --port 8001
와 같이해서 일단 실행되긴 합니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 49 | |
| 36 | |
| 33 | |
| 31 | |
| 22 | |
| 21 | |
| 17 | |
| 16 | |
| 15 | |
| 14 | |
| 11 | |
| 10 | |
| 9 | |
| 8 | |
| 7 | |
| 3 | |
| 2 | |
| 1 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기