docs: auth.ro-being.com HTTPS 설정 문서 추가
- SSL/HTTPS 설정 과정 상세 기록 - nginx-deploy 저장소 구조 설명 - 문제 해결 과정 및 최종 결과 추가
This commit is contained in:
parent
f2b4e09b1c
commit
fd9b5228a4
@ -126,8 +126,63 @@ services:
|
||||
- `/home/happybell/projects/ivada/nginx-deploy/default.conf` - Nginx 설정
|
||||
- `/home/happybell/projects/ivada/skill_email/` - Gmail 스킬 (통합 예정)
|
||||
|
||||
## SSL/HTTPS 설정 추가
|
||||
|
||||
### 문제 상황
|
||||
- HTTP는 정상 작동하지만 HTTPS 접속 불가
|
||||
- SSL 인증서는 이미 발급되어 있음 (auth.ro-being.com)
|
||||
- nginx 설정에 HTTPS 서버 블록 누락
|
||||
|
||||
### 해결 과정
|
||||
|
||||
1. **nginx-deploy 저장소 구조 파악**:
|
||||
- `default.conf`: Docker nginx 설정 (legacy)
|
||||
- `server-nginx-default`: 실제 서버 nginx 설정 파일
|
||||
- GitHub Actions가 `server-nginx-default`를 서버의 `/etc/nginx/sites-available/default`로 복사
|
||||
|
||||
2. **HTTPS 서버 블록 추가**:
|
||||
```nginx
|
||||
# Auth server configuration
|
||||
server {
|
||||
listen 80;
|
||||
server_name auth.ro-being.com;
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name auth.ro-being.com;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/auth.ro-being.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/auth.ro-being.com/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:9000/; # 끝에 / 필수!
|
||||
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;
|
||||
|
||||
# OAuth 콜백 타임아웃 늘리기
|
||||
proxy_read_timeout 300s;
|
||||
proxy_connect_timeout 75s;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 최종 결과
|
||||
- ✅ HTTPS 접속: 정상 작동
|
||||
- ✅ HTTP → HTTPS 리다이렉션: 설정됨
|
||||
- ✅ SSL 인증서: 유효 (2025-10-14까지)
|
||||
- ✅ Health check: 정상 응답
|
||||
- ✅ OAuth 타임아웃: 300초로 설정
|
||||
|
||||
## 교훈
|
||||
|
||||
1. **Nginx proxy_pass 설정**: 끝에 `/` 유무가 경로 전달에 중요한 영향
|
||||
2. **중앙 인증의 장점**: 토큰 관리 일원화, 보안 강화, 확장성
|
||||
3. **마이크로서비스 구조**: 각 서비스(인증, API, 로빙)를 독립적으로 관리
|
||||
3. **마이크로서비스 구조**: 각 서비스(인증, API, 로빙)를 독립적으로 관리
|
||||
4. **SSL 설정 패턴**: HTTP는 HTTPS로 리다이렉션, HTTPS 블록에 실제 프록시 설정
|
||||
5. **nginx-deploy 워크플로우**: 로컬 수정 → Git push → GitHub Actions → 서버 배포
|
||||
Loading…
x
Reference in New Issue
Block a user