0

I have an Apache reverse proxy set up and my backend service is configured on a specific static ServiceUri="site.com". I would like requests coming for multiple domains a.site.com/data, b.site.com/data etc. to be forwarded to my backend service. The problem is that my service does not recognize a.site.com/data as valid. Only site.com/data is served. I cannot change the backend to be flexible enough to accept $random$.site.com URIs. Is there a way for me to manipulate the request header within the VirtualHost so that my backend only sees a request of site.com/data but the reply to the queried clients still respects the original header? My VH looks like this:

<IfModule mod_ssl.c>
        Listen 3000
        <VirtualHost _default_:3000>

                DocumentRoot /var/www/html

                SSLEngine on

                SSLCertificateFile      /etc/apache2/ssl/dom.pem
                SSLCertificateKeyFile /etc/apache2/ssl/dom.key

               <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>

                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>


               SSLProxyEngine on
               SSLProxyVerify none
               SSLProxyCheckPeerCN off
               ProxyPass / https://127.0.0.1:9000/
               ProxyPassReverse / https://127.0.0.1:9000/

        </VirtualHost>
</IfModule>
Mnemosyne
  • 131
  • 1
  • 7

0 Answers0