Skip to main content

Virtual Hosting with Tomcat or Apache

Today we had unique requirement of pointing 2 domains names to same tomcat instance with different web applications. Googled it for 5 mins and there were multiple answers to solve it. I should not forget it so writing in my blogbook.

Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same host name. The term virtual hosting is usually used in reference to web servers but the principles carry over to other internet services.


Apache HTTP Option:

More Information : http://httpd.apache.org/docs/2.0/vhosts/examples.html


Tomcat Virtual Host:

More information: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

http://www.ex-parrot.com/~pete/tomcat-vhost.html

Comments

Popular posts from this blog

How to generate POJO's from Database for HBM or Annotated java beans?

This document will provide steps to reverse engineer POJO’s from Database tables for Hibernate mappings. Step 1 : Open Netbeans IDE and Create Project (Click to enlarge image) Step 2 : Create Hibernate configuration file Provide Database details with dialect Click finish button and it will generate ‘hibernate.cfg.xml’ files. Step 3 : Using Hibernate reverse engineering Wizard create ‘hibernate.reveng.xml’ file Click Next. Select Database tables to generate DAO’s. Click Finish button this will generate ‘hibernate.reveng.xml’ file Step 5 : Create POJO classes. Option One: For HBM mapping file Option Two: For Annotations Click finish button and it will generate POJO (DAO beans) into provided package. Ping me if you need any further help.

Chalata Hai???

I was reading article about logical Indian on Facebook. This very much discussed topic, punctuality of Indians for committed time. It is my experience that we Indian always take 5 to 10 mins liberty for committed appointment. This is part of “chalata hai” attitude. I wish we will able to get rid of such common habit. This also gets reflected in professional work. Software companies follows agile plan daily standup meeting. When senior member makes it mandatory to attend meeting then people somehow try’s (yes people literally tryJ) to come meeting and most of the time 2 to 5 mins late. Then question can we not able manage for 5/10 mins early than planned meeting. When working with other country people, I had experienced they make sure reach 5 to 10 mins before appointment. But we always give excuse about traffic but how come it happens every day and every meeting. It is “Chalata hai” attitude. Same attitude reflected when crossing red light, cutting lane, overtaking and b...

AJax

AJAX = Asynchronous JavaScript and XML AJAX is not a new programming language, but a new technique for creating better, faster, and more interactive web applications. With AJAX, a JavaScript can communicate directly with the server, with the XMLHttpRequest object. With this object, a JavaScript can trade data with a web server, without reloading the page. AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages. The AJAX technique makes Internet applications smaller, faster and more user-friendly. AJAX is based on Internet standards AJAX is based on the following web standards: JavaScript XML HTML CSS AJAX applications are browser and platform independent. AJAX is about better Internet-applications Internet-applications have many benefits over desktop applications; they can reach a larger audience, they are easier to install and...