정적 폴더 경로와 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>