I found this post and updated my config.
I have this reverse proxy configuration on Apache.
<VirtualHost *:80>
ServerName a123.com
ServerAlias www.a123.com
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/ [R,L]
</VirtualHost>
<VirtualHost *:443>
ProxyPreserveHost On
ProxyPass "/test2/" "http://localhost:48630"
ProxyPassReverse "/test2/" "http://localhost:48630"
ProxyPass "/" "http://localhost:5000/"
ProxyPassReverse "/" "http://localhost:5000/"
ErrorLog /var/log/httpd/a123-error.log
CustomLog /var/log/httpd/a123-access.log common
SSLEngine on
SSLCertificateFile /etc/ssl/certs/a123.com.crt
SSLCertificateKeyFile /etc/ssl/private/a123.com.key
</VirtualHost>
How should this config be changed to access both www.a123.com and test2.a123.com subdomains?
I can only access www.a123.com or www.a123.com/test2/ now with this configuration?