# ============================================================================= # ai.ncue.net — Apache 2.4+ SSL → Node webplatform (단일 백엔드) # ============================================================================= # 필요 모듈: ssl, proxy, proxy_http, headers # sudo a2enmod ssl proxy proxy_http headers # # Node listen 주소·포트는 .env 의 HOST / PORT 와 맞출 것 (기본 127.0.0.1:8030). # 아래 127.0.0.1:8030 은 예시이며, 실제 프로세스 포트로 바꾸면 됩니다. # # 왜 경로별 ProxyPass 를 나누지 않나? # - 이 저장소의 server.js 가 /chat, /learning, /admin, /ai-explore 등 모든 경로를 한 프로세스에서 처리합니다. # - 동일 포트(8030)로 여러 줄 나누면 유지보수만 불필요하게 복잡해지고, 8018/8030 혼선만 생깁니다. # - 한 줄 ProxyPass / 로 충분합니다. # # Apache 2.4.31+ : ProxyAddHeaders On 이 X-Forwarded-* 를 백엔드에 넘깁니다(클라이언트 IP 추적 등). # 그보다 오래된 Apache 면 ProxyAddHeaders 줄을 제거하고, 필요 시 X-Forwarded-For 수동 설정을 검토하세요. # ============================================================================= ServerName ai.ncue.net ProxyPreserveHost On # 대용량 업로드(회의 음성 등, 앱 MEETING_AUDIO_MAX_MB 와 맞출 것) LimitRequestBody 314572800 TimeOut 600 ProxyTimeout 600 # HTTPS 프록시임을 Node/앱에 알림 (쿠키 Secure, 리다이렉트 URL 등) RequestHeader set X-Forwarded-Proto "https" # 클라이언트 IP 등 전달 (Apache 2.4.31+, mod_proxy_http) ProxyAddHeaders On ProxyPass / http://127.0.0.1:8030/ ProxyPassReverse / http://127.0.0.1:8030/ SSLEngine on Include /etc/letsencrypt/options-ssl-apache.conf ErrorLog ${APACHE_LOG_DIR}/ai.ncue.net_ssl_error.log CustomLog ${APACHE_LOG_DIR}/ai.ncue.net_ssl_access.log combined Require all granted Require not env bad_bot SSLCertificateFile /etc/letsencrypt/live/ncue.net-0001/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/ncue.net-0001/privkey.pem