[Apache] Apache Vhost 세팅 (React, SpringBoot) - PM2 배포 시

2026. 6. 18. 20:40·Tech Archive/Apache

React, SpringBoot

- 해당하는 도메인을 PM2로 올라간 서비스에 Proxy 처리

 

 

HTTP

<VirtualHost *:80>
    #main domain
    ServerName test.com

    #document Root
    DocumentRoot /var/www/html/test

    #additional setting
    <Directory /var/www/html/test>
        #Options FollowSymLinks MultiViews
        Options -Indexes +FollowSymLinks
        AllowOverride All
        require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/test.com-error.log
    CustomLog ${APACHE_LOG_DIR}/test.com-access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =test.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

 

HTTPS

<IfModule mod_ssl.c>
<VirtualHost *:443>
    #Main domain
    ServerName test.com

    #Proxy setting
    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass / http://localhost:23416/
    ProxyPassReverse / http://localhost:23416/

    ErrorLog ${APACHE_LOG_DIR}/test.com-error.log
    CustomLog ${APACHE_LOG_DIR}/test.com-access.log combined

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/test.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/test.com/privkey.pem
</VirtualHost>
</IfModule>

 

 

'Tech Archive > Apache' 카테고리의 다른 글

[Apache] Apache Vhost 폴더경로와 ProxyPass 동시 설정  (0) 2026.06.18
[Apache] Reverse Proxy 사용 포트포워딩 설정하기  (0) 2021.04.26
[Apache] Apache Tomcat 연동  (0) 2021.02.25
'Tech Archive/Apache' 카테고리의 다른 글
  • [Apache] Apache Vhost 폴더경로와 ProxyPass 동시 설정
  • [Apache] Reverse Proxy 사용 포트포워딩 설정하기
  • [Apache] Apache Tomcat 연동
roundfigure
roundfigure
알 수 없는 에러, 기술, 그리고 딱 떨어지는 해답. 사방으로 흩어진 모호한 문제들, 매끄러운 'Round Figure'로 정리하고 싶은 블로그.
  • roundfigure
    Round Figure
    roundfigure
  • 전체
    오늘
    어제
    • 전체 글 (111) N
      • Tech Archive (40)
        • Linux (2)
        • Linux(CentOS) (9)
        • Apache (4)
        • SpringBoot (3)
        • React (0)
        • Javascript (8)
        • JSTL (5)
        • 웹접근성 (4)
        • MySQL (2)
        • Unity (0)
        • ETC (3)
      • Trend (17)
      • AI활용 (37)
      • Hosting & Infra (5) N
      • Automation & Lab (1)
      • Error & Trouble Shooting (11)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

    • StackFreeks
    • StackFreeksTools
    • zeuz
    • hydok
  • 공지사항

  • 인기 글

  • 태그

    웹접근성
    설치
    claude code
    Proxy
    Linux
    apache
    ai 코딩 도구
    jquery
    SWE-bench
    클로드 코워크
    프로그래밍
    리눅스
    VPS 비교
    javascript
    CursorRules
    mysql
    CentOS 7
    JSTL
    CLAUDE.md
    Claude Cowork
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.6
roundfigure
[Apache] Apache Vhost 세팅 (React, SpringBoot) - PM2 배포 시
상단으로

티스토리툴바