[Apache] Apache Vhost 폴더경로와 ProxyPass 동시 설정

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

 

정적 폴더 경로와 Proxy 설정 예시

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

    # 정적 파일 서빙: /build 로 시작하는 요청은 로컬 폴더에서 제공
    Alias /metaverse /var/www/html/test/metaverse
    <Directory /var/www/html/test/metaverse>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>

    ProxyRequests Off
    ProxyPreserveHost On

    # 정적 파일 외의 모든 요청은 프록시로 넘김
    ProxyPassMatch ^/(?!metaverse)(.*)$ http://localhost:23417/$1
    ProxyPassReverse / http://localhost:23417/

    ErrorLog ${APACHE_LOG_DIR}/test.com-error.log
    CustomLog ${APACHE_LOG_DIR}/test.com-access.log combined
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} =test.com
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]


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

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

[Apache] Apache Vhost 세팅 (React, SpringBoot) - PM2 배포 시  (0) 2026.06.18
[Apache] Reverse Proxy 사용 포트포워딩 설정하기  (0) 2021.04.26
[Apache] Apache Tomcat 연동  (0) 2021.02.25
'Tech Archive/Apache' 카테고리의 다른 글
  • [Apache] Apache Vhost 세팅 (React, SpringBoot) - PM2 배포 시
  • [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
  • 공지사항

  • 인기 글

  • 태그

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

  • 최근 글

  • hELLO· Designed By정상우.v4.10.6
roundfigure
[Apache] Apache Vhost 폴더경로와 ProxyPass 동시 설정
상단으로

티스토리툴바