After googling for a while I came to know that some configuration changes need to be made to the server.xml file for the subdomains to work.

So, I changed the server.xml as follows. Can you please tell me if I did it the right way??

Thanks,
Joe.

   <Engine name="Catalina" defaultHost="localhost">

     <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
            resourceName="UserDatabase"/>


        <Host name="localhost" appBase="webapps"
      unpackWARs="true" autoDeploy="true"
      xmlValidation="false" xmlNamespaceAware="false">

        </Host>

        <Host name="woodpics.localhost" appBase="webapps\woodpics"
        unpackWARs="true" autoDeploy="true"
        xmlValidation="false" xmlNamespaceAware="false">


                        <Context path="/" docBase=".">

                          <Resource name="jdbc/mySQLDB"
                                                   auth="Container"
                                                   type="javax.sql.DataSource"
                                                   maxActive="100"
                                                   maxIdle="5"
                                                   maxWait="10000"
                                                   username="root"
                                                   password="asstadmn"
                                                   
driverClassName="org.gjt.mm.mysql.Driver"
                                                   
url="jdbc:mysql://csiredhat:3306/pub"
                                                   removeAbandoned="true"
                                                   removeAbandonedTimeout="60"
                                                   logAbandoned="true" />


                        </Context>
        </Host>

        </Engine>




From: "Joe Hansen" <[EMAIL PROTECTED]>
Reply-To: users@httpd.apache.org
To: users@httpd.apache.org
CC: [EMAIL PROTECTED]
Subject: [EMAIL PROTECTED] Help configuring subdomains.
Date: Wed, 18 Oct 2006 21:59:25 +0000

Hi All,

Probably this could be the most asked question. I have tried a few things and they haven't worked out. So here I am, asking your help.

Environment:
Windows XP; Apache 2/Tomcat 5/mod_jk;

Apache Installation Directory: c:\Apache
Tomcat Installation Directory: c:\Tomcat

httpd.conf file (current modifications):
LoadModule jk_module modules/mod_jk.so
JkWorkersFile c:\Tomcat\conf\workers.properties
JkLogFile c:\Apache\logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %
JkMount /* ajp13

Contents of c:\Tomcat\webapps folder:
balancer
jsp-examples
ROOT
servlets-examples
woodpics

Contents of my hosts file in windows..
127.0.0.1       localhost joe woodpics.joe woodpics.localhost

Problem description:
I would like to configure a subdomain called "woodpics" (woodpics.localhost) that would serve the files from the directory c:\Tomcat\webapps\woodpics.

http://woodpics.localhost/home.jsp ==> c:\Tomcat\webapps\woodpics\home.jsp
and
http://localhost/home.jsp ==> c:\Tomcat\webapps\ROOT\index.jsp


Things that I tried and did not work:

Added the following to httpd.conf:
NameVirtualHost *:80

<VirtualHost *:80>
        ServerName localhost
        DocumentRoot c:/Tomcat/webapps/
</VirtualHost>

<VirtualHost *:80>
        ServerName woodpics.localhost
        DocumentRoot c:/Tomcat/webapps/woodpics/
</VirtualHost>

When I access http://woodpics.localhost/home.jsp, I get a 404 error. When I access http://woodpics.localhost/woodpics/home.jsp I get the home.jsp page in c:\Tomcat\webapps\woodpics folder.

I tried my best to describe the problem. Hope someone can help me with this!

Thanks for reading!

Sincerely,
Joe.

_________________________________________________________________
Try Search Survival Kits: Fix up your home and better handle your cash with Live Search! http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=hmtagline


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows Live Spaces http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to