tomcat virtual hosting question

5 pts.
Tags:
Apache Tomcat
Tomcat
Virtual Hosting
I installed tomcat 5.5 on d:Tomcat 5.5 which is a directly from tomcat.apache.com homepage not xampp Previously, i have defined something like on c:Program Filesxamppapacheconfextrahttpd-vhosts.conf on xampp- script is : # # Virtual Hosts # # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http:// # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # NameVirtualHost *:80 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. # ##<VirtualHost *:80> ## ServerAdmin webmaster@dummy-host.example.com ## DocumentRoot /www/docs/dummy-host.example.com ## ServerName dummy-host.example.com ## ServerAlias www.dummy-host.example.com ## ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log ## CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common ##</VirtualHost> ##<VirtualHost *:80> ## ServerAdmin webmaster@dummy-host2.example.com ## DocumentRoot /www/docs/dummy-host2.example.com ## ServerName dummy-host2.example.com ## ErrorLog @rel_logfiledir@/dummy-host2.example.com-error_log ## CustomLog @rel_logfiledir@/dummy-host2.example.com-access_log common ##</VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@skywalk-ent.com DocumentRoot "C:/Program Files/xampp/htdocs/Public/myweb/" ServerName localhost ServerAlias www.skywalk-ent.com ## ErrorLog @rel_logfiledir@/skywalk-ent.com-error_log ## CustomLog @rel_logfiledir@/skywalk-ent.com-access_log common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@site1.com DocumentRoot "C:/Program Files/xampp/htdocs/Public/myweb/site1/" ServerName site1.loc ServerAlias www.adex-hk.com ## ErrorLog @rel_logfiledir@/site1.com-error_log ## CustomLog @rel_logfiledir@/site1.com-access_log common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@site2.com DocumentRoot "C:/Program Files/xampp/htdocs/Public/myweb/site2/" ServerName site2.loc ## ErrorLog @rel_logfiledir@/site2.com-error_log ## CustomLog @rel_logfiledir@/site2.com-access_log common </VirtualHost> this is to define if i have to define several sites such as site1, site2, site3 etc., Then how to do the same effect for virtual hosting on Tomcat please instruct and tell On c: windowssystemsdriversetchosts script is : 127.0.0.1 localhost 127.0.0.1 site1.loc 127.0.0.1 site2.loc 127.0.0.1 site3.loc i also specify site1,site2,site3 etc., How to do it on tomcat? Anyhow, i would like to run several website on tomcat 5.5, please tell how to config and procedure for virtual host and any further additional efforts in order to serve more than one site on the tomcat 5.5 webserver. Please give procedure. thanks, gar  



Software/Hardware used:
windows server 2003

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following