Socialabel

Sunday, April 3, 2016

REVERSE PROXY APACHE HTTP DAN HTTPS

========================================
MODE 1
======================================== 
 
<VirtualHost *:*>
    ProxyPreserveHost On

    # Servers to proxy the connection, or;
    # List of application servers:
    # Usage:
    # ProxyPass / http://[IP Addr.]:[port]/
    # ProxyPassReverse / http://[IP Addr.]:[port]/
    # Example: 
    ProxyPass / http://0.0.0.0:8080/
    ProxyPassReverse / http://0.0.0.0:8080/

    ServerName localhost
</VirtualHost> 
 
 
 
 
=====================================
MODE 2 
=====================================
<Proxy balancer://mycluster>
    # Define back-end servers:

    # Server 1
    BalancerMember http://0.0.0.0:8080/

    # Server 2
    BalancerMember http://0.0.0.0:8081/
</Proxy>

<VirtualHost *:*>
    # Apply VH settings as desired
    # However, configure ProxyPass argument to
    # use "mycluster" to balance the load

    ProxyPass / balancer://mycluster
</VirtualHost>
 
 
 
=========================================
MODE 3 - SSL ON
========================================
Listen 443

NameVirtualHost *:443
<VirtualHost *:443>

    SSLEngine On

    # Set the path to SSL certificate
    # Usage: SSLCertificateFile /path/to/cert.pem
    SSLCertificateFile /etc/apache2/ssl/file.pem


    # Servers to proxy the connection, or;
    # List of application servers:
    # Usage:
    # ProxyPass / http://[IP Addr.]:[port]/
    # ProxyPassReverse / http://[IP Addr.]:[port]/
    # Example: 
    ProxyPass / http://0.0.0.0:8080/
    ProxyPassReverse / http://0.0.0.0:8080/

    # Or, balance the load:
    # ProxyPass / balancer://balancer_cluster_name

</VirtualHost>
 

1 comment:

  1. Slots Demo Fruit Party | Play Online Casino Games & Slots クイーンカジノ クイーンカジノ happyluke happyluke 257Mahad Ganpati Bet - Lawmaker in India

    ReplyDelete