Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install Apache Httpd using the following command.
    $sudo apt-get install apache2
  2. Enable the following required modules.
    $sudo a2enmod proxy_http
    $sudo a2enmod ssl
    $sudo a2enmod proxy_balancer
  3. Configure to direct the HTTP requests to the worker nodes with load balancing as http://xxx.xxx.xxx.xx3/<service> via HTTP 80 port.
    $sudo vi /etc/apache2/site-available/wso2.as.com.conf

    Code Block
    languagexml
    <VirtualHost xxx.xxx.xxx.xx3:80>
    	ServerName as.wso2.com
    
    	# disable forward proxy requests
    	ProxyRequests off
    
    	<Proxy balancer://wso2.as.com>
    		# Add a member to the load balancing group
    		BalancerMember http://asxxx.xxx.wso2xxx.comxx3:97659763
    		BalancerMember http://asxxx.xxx.wso2xxx.comxx4:97669763
    		ProxySet lbmethod=byrequests
    	</Proxy>
    
    	ProxyPass / balancer://wso2.as.com/
    	ProxyPassReverse / balancer://wso2.as.com/
    </VirtualHost>
  4. Configure to direct the HTTPS requests to the worker nodes with load balancing as https://xxx.xxx.xxx.xx3/<service> via HTTPS 443 port.
    $sudo vi /etc/apache2/site-available/wso2.as.com.conf

    Code Block
    languagexml
    <VirtualHost xxx.xxx.xxx.xx3:443>
    	ServerName as.wso2.com
    	ProxyRequests off
    
    
    	# creating debug logs
    	LogLevel debug
    
    
    	<Proxy balancer://ssl.wso2.as.com>
    		BalancerMember https://asxxx.xxx.wso2xxx.comxx3:94459443
    		BalancerMember https://asxxx.xxx.wso2xxx.comxx4:94469443
    		ProxySet lbmethod=byrequests
    	</Proxy>
    
    
    	ProxyPass / balancer://ssl.wso2.as.com/
    	ProxyPassReverse / balancer://ssl.wso2.as.com/
    
    
    	# enable SSL/TLS for a that virtual host
    	SSLEngine On
    	SSLCertificateFile /etc/apache2/ssl/wrk.crt
    	SSLCertificateKeyFile /etc/apache2/ssl/wrk.key
    
    
    	# enable SSL/TLS for proxy usage in a particular virtual host
    	SSLProxyEngine On
    </VirtualHost>
  5. Configure Apache Httpd to access the management console asĀ https://xxx.xxx.xxx.xx2/carbon via HTTPS 443 port.

    Code Block
    <VirtualHost xxx.xxx.xxx.xx2:443>
    
    ServerName mgt.as.wso2.com
    ProxyRequests off
    LogLevel debug
    ProxyPass /carbon https://xxx.xxx.xxx.xx2:9443/carbon/
    ProxyPassReverse /carbon https://xxx.xxx.xxx.xx2:9443/carbon/
    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/mgt.crt
    SSLCertificateKeyFile /etc/apache2/ssl/mgt.key
    SSLProxyEngine On
    </VirtualHost>
  6. Enable virtual host configurations.
    $sudo a2ensite wso2.as.com.conf
  7. Restart Apache Httpd.
    $sudo /etc/init.d/apache2 restart

...