#StackBounty: #ubuntu #apache-2.4 #proxy #subdomain #asp.net-mvc How to configure multiple Apache subdomains for .NET CORE 2.0 on UBUNTU?

Bounty: 50

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 *: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

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?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.