Monday, March 11, 2013

Reverse Proxy, SSL Load Balancing with Apache

On the proxy server


 

ProxyRequests Off
<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/ stickysession=BALANCEID nofailover=On
ProxyPassReverse / http://localhost:82/
ProxyPassReverse / http://localhost:83/
<Proxy balancer://mycluster>
  BalancerMember http://localhost:82  route=http2
  BalancerMember http://localhost:83  route=http3
  ProxySet lbmethod=byrequests
</Proxy>
<Location /balancer-manager>
  SetHandler balancer-manager
  Order deny,allow
  Allow from all
</Location>

 On the balanced server1


RewriteEngine On
RewriteRule .* - [CO=BALANCEID:balancer.http3:.localhost:82]

 On the balanced server2


RewriteEngine On
RewriteRule .* - [CO=BALANCEID:balancer.http3:.localhost:83] 



For SSL Installation .... 

Install openssl 

openssl req -new -x509 -days 365 -nodes -out /usr/local/apache/ssl/httpd.
pem -keyout /usr/local/apache/ssl/httpd.key
Listen 443


AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl


SSLPassPhraseDialog  builtin

SSLSessionCache        "shmcb:/usr/local/apache/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300


SSLMutex  "file:/usr/local/apache/logs/ssl_mutex"



<VirtualHost _default_:443>

#   General setup for the virtual host
DocumentRoot "/usr/local/apache/htdocs"
ServerName vps06.langoor.it:443
ServerAdmin you@example.com
ErrorLog "/usr/local/apache/logs/error_log"
TransferLog "/usr/local/apache/logs/access_log"

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on
SSLProtocol all -SSLv2

SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5


SSLCertificateFile /usr/local/apache/ssl1/httpd.pem

SSLCertificateKeyFile /usr/local/apache/ssl1/httpd.key
#SSLCertificateKeyFile "/usr/local/apache/conf/server-dsa.key"



#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/apache/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>


#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
#   "force-response-1.0" for this.
BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

CustomLog "/usr/local/apache/logs/ssl_request_log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>                                


Tuesday, May 20, 2008

Importance of JavaScript

The world is a global village. The organizations are operating from multiple geographic locations. The availability of right information at right time is vital for success of any business. Business executive want availability of information while travelling also.


The solution to the problems cited above is web based applications. The internet is the only glue which can connect people and processes seamlessly. The information is available at anytime anywhere, just a click away. But bandwidth is too slow and every click takes ages to load the page. The internet bandwidth is the bottleneck for many applications. The problem becomes worse when we have to deal with heavy media files.


JavaScript and Ajax (Asynchronous JavaScript) can solve bandwidth problems up to a greater extent. The following are two good reasons.


1. Small responses can be given to user instantaneously using JavaScript reducing number of server hits in a given session.

2. Ajax can be used, in order to reduce the information which is asked from server. Use Ajax for only loading a particular section of the page instead of refreshing whole page. Google maps, Gmail are great example of Ajax application running pretty well on considerably slow connection.


Not to mention user experience can be made more pleasant by making interactive applications using JavaScript. The advent of JavaScript API’s like JQUERY, YUI has solved cross browser puzzle up to a greater extent. Every developer doesn’t have to grapple with cross browser enigma. They can concentrate on core application functionality.

Friday, October 5, 2007

Wirable web by end users

Java script is going to be the key element of technologies that are going to come in future. The gap between browser and desktop can only be bridged by javascript( or any other client side scripting language). The palateform ilands can be as follows.

  • Browser to desktop.
  • Browser to browser.
  • Desktop to browser.

If we want to make wirable web by end user then we will have to bridge the gap between the above mentioned plateform ilands.

Tuesday, October 2, 2007

Emerging web trends

I predict web trends as follows:

  • The scripting languages are going to rule the web because they are fast and have steep learning curve.
  • Browsers will turn into a platform where applications will run. It will become more prevalent as computation power and bandwidth will increase.
  • Web pages will be more intelligent and dynamic than ever.
  • A tradition of dynamic content generation based of user's preference.
  • The research on artificial intelligence will yield very nice chatbots.
  • Websites and web applications will become very intelligent.
  • Ajax and ActiveX controls will be the key driving factors for web.
  • There will be grate money in building chatbots and ActiveX controls.
  • Within coming 5 years open source is going to take away significant market share from proparatory vendors.