?
Solved

Multiple domain names and JSP

Posted on 2003-03-24
5
Medium Priority
?
314 Views
Last Modified: 2010-03-04
I have multiple domain names having the same IP address and port number: 80.  I want to run JSP on all these domain names.  I'm willing to use JRun4 or Tomcat.  I would appreciate someone providing me step by step explanation of how to set it up either with JRun or Tomcat...

Thanks,
Asim
0
Comment
Question by:asimalp
  • 3
  • 2
5 Comments
 
LVL 3

Expert Comment

by:NetWize
ID: 8200548
Hi asimalp,

you can setup named virtual hosts in tomcat, so i guess that is what you want. Get a copy of tomcat (4.1.18) running and we'll go through the changes to make in server.xml step by step.

Jan
0
 

Author Comment

by:asimalp
ID: 8204552
I got tomcat 4.1.24 and Apache's latest version.  Would that work?  If not, you can just proceed and I'll just install Tomcat 4.1.18.  I don't think that there would be a significant difference.
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8204794
i guess any tomcat 4.1 will do...

take the server.xml and scroll down till you see a <Host> entry: That defines a (named) virtual host in tomcat.

<Host name="domain.de" appBase="/home/domain/www/html">
  <Alias>www.domain.de</Alias>
  <Logger className="org.apache.catalina.logger.FileLogger"
                    directory="/home/domain/var/log"
                    prefix="tomcat4_log."
                    timestamp="true"/>

            <Realm className="org.apache.catalina.realm.MemoryRealm" />

            <Context path=""
                     docBase="/home/domain/www/html"
                     crossContext="false"
                     reloadable="true" />

</Host>

Just copy & past that for all your virtual hosts...
Then setup the mod_jk.conf to forward all *.jsp-Requests to tomcat at it should work.
0
 

Author Comment

by:asimalp
ID: 8205511
How about on the Apache side for the virtual hosts?  What exactly do I have to write?  And, how do I setup jk2 for forwarding jsp requests to tomcat?

BTW, I'm using Windows XP.
0
 
LVL 3

Accepted Solution

by:
NetWize earned 200 total points
ID: 8205554
äh, i'm unsure about the apache virtual host setup but i think that there should be examples in the httpd.conf:

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

So you'd copy this and change ServerName to your domainnames. DocumentRoot should pint to the same directory you entered into the tomcat server.xml

jakarta.apache.org/tomcat has good documentatino about how to setup mod_jk
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month9 days, 2 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question