Apache multiple reverse proxy different ip's

I have two websites that each have their own ip and certificates.

Does anyone have a template so I can reverse proxy to these websites with the proper certificate and ip? or is that even possible from one apache server?

For example:

www.domain1.com  internal proxied ip
www.domain2.com  internal proxied ip

They both must be reachable as a root site from the internet with their https cert.

As it stands now I can add one or the other, didnt know how to add both.

Here is a snapshot of one set of apache configs.  Not sure how to turn this into two sites.

It does work as one site just fine.


<VirtualHost *:80>
        Redirect permanent /


# more httpd-ssl.conf
Listen 443

<VirtualHost _default_:443>
        SSLEngine on
        DocumentRoot "/opt/hpws22/apache/htdocs"
        ServerName SERVER:443
        ServerAdmin www@SERVER
        ErrorLog "/opt/hpws22/apache/logs/error_log"
        TransferLog "/opt/hpws22/apache/logs/access_log"
        SSLCertificateFile /opt/hpws22/apache/conf/certs/DOMAIN1/www.domain1.com.crt
        SSLCertificateKeyFile "/opt/hpws22/apache/conf/certs/DOMAIN1/www.domain1.com.key"
        SSLCertificateChainFile "/opt/hpws22/apache/conf/certs/DOMAIN1/SSLCACertificate.crt"
        SSLProtocol -all +SSLv3 +TLSv1
        <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
        <Directory "/opt/hpws22/apache/cgi-bin">
            SSLOptions +StdEnvVars
        ProxyPass /
        ProxyPassReverse /
        BrowserMatch ".*MSIE.*" \
                 nokeepalive ssl-unclean-shutdown \
                 downgrade-1.0 force-response-1.0
        CustomLog "/opt/hpws22/apache/logs/ssl_request_log" \
                  "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
Who is Participating?
ahoffmannConnect With a Mentor Commented:
# following configuration should do the trick:

Listen :443
# NameVirtualHost


<VirtualHost :443>
meleehuntAuthor Commented:
Thank you trying to get it to work with two different certs ( 1 for each site )
meleehuntAuthor Commented:
I couldnt get more than one cert to work if they were different.  But that could be just me.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.