?
Solved

Apache multiple reverse proxy different ip's

Posted on 2012-04-10
3
Medium Priority
?
478 Views
Last Modified: 2012-04-19
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  192.168.1.2  internal proxied ip 192.100.1.2
www.domain2.com  10.10.1.2  internal proxied ip 10.100.1.2

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.

httpd.conf

<VirtualHost *:80>
        ServerName 192.168.1.2
        Redirect permanent / https://192.168.1.2/
</VirtualHost>


httpd-ssl.conf

# 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"
        SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
        SSLProtocol -all +SSLv3 +TLSv1
        #
        <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory "/opt/hpws22/apache/cgi-bin">
            SSLOptions +StdEnvVars
        </Directory>
        #
        ProxyPass / http://192.168.100.2:9080/
        ProxyPassReverse / http://192.168.100.2:9080/
        #
        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"
</VirtualHost>                                  
#
0
Comment
Question by:meleehunt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 2000 total points
ID: 37831612
# following configuration should do the trick:

Listen 192.168.1.2:443
Listen  10.10.1.2 :443
# NameVirtualHost

<VirtualHost 192.168.1.2:443>
...

<VirtualHost 10.10.1.2 :443>
...
0
 

Author Comment

by:meleehunt
ID: 37852033
Thank you trying to get it to work with two different certs ( 1 for each site )
0
 

Author Closing Comment

by:meleehunt
ID: 37867891
I couldnt get more than one cert to work if they were different.  But that could be just me.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question