?
Solved

Multiple domain names and JSP

Posted on 2003-03-24
5
Medium Priority
?
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

752 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