Apache2를 사용하여 역방향 프록시를 실행하고 있으며 다음 vHost가 구성되어 있습니다.
<VirtualHost *:80>
ServerName rds.example.com
Redirect / https://rds.example.com/RDWeb/
</VirtualHost>
<VirtualHost *:443>
# Proxy
ServerName rds.example.com
ProxyPreserveHost on
SSLProxyEngine on
SSLProxyVerify off
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPass / https://backend01.example.com/
ProxyPassReverse / https://backend01.example.com/
SSLCertificateFile /etc/letsencrypt/live/rds.example.com//fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/rds.example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
클라이언트가 접속할 때http://rds.example.com또는https://rds.example.com, 그를 https.//rds.example.com/RDWeb(Microsoft의 기본 원격 데스크톱 웹 서비스)으로 리디렉션하고 싶습니다.
실제로 클라이언트가 연결되면 클라이언트는 다음으로만 리디렉션됩니다.https://rds.example.com아름다운 IIS 페이지와 함께.
내가 도대체 뭘 잘못하고있는 겁니까 ?
답변1
mod_rewrite
원하는 곳으로 리디렉션하는 데 사용할 수 있습니다 . 이를 SSL 가상 호스트에 통합하세요.
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule .* /RDWeb/ [R,L]
mod_rewrite를 활성화하는 것을 잊지 마십시오( a2enmod
가능한 경우 사용).