----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

You need to turn ApJServMountCopy OFF and specify the mount points
separately for each virtual server.

You would probably be better off running separate Apache/JServ instances for
production and development.  Your current configuration, as well as what you
are trying to do, will use only one JVM.  This can be a bad thing.  A
servlet in development can crash the JVM.  Class reloading being performed
on development servlets will take additional memory that won't be freed
until the JVM is restarted(at least from my experiences).  There is also a
performance hit for having class reloading turned on -- in a production
environment you may want to turn it off.  Of course, depending on your
applications this may not be a problem.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Matthew
Taylor
Sent: Wednesday, October 11, 2000 4:44 PM
To: [EMAIL PROTECTED]
Subject: RE: virtual hosting multiple sites with jserv


----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

[deleted previous, environment is Apache1.3.12, Jserv 1.1.2 on NT - sigh I'd
prefer *nix but pretty sure this problem is configuration related]


thanks, my original problem was having the line,
ApJServMount /servlets /nexusroot
(where nexusroot is the zone name of my servlets)
in httpd.conf and not having loaded the jserv module.
fixed that and created a few zones no problem, I now have
localhost/servlets1/IsItWorking  &
localhost/servlets2/IsItWorking
where servlets1 and servlets2 are separate zones.

I also have
domainname.name1   &
domainname.name2
working.

I can access
domainname.name1/servlets1/IsItWorking
domainname.name1/servlets2/IsItWorking
domainname.name2/servlets1/IsItWorking
domainname.name2/servlets2/IsItWorking

NB: servlets1/IsItWorking and servlets2/IsItWorking are the same
irrespective of the domainname.name1 or name2. this is OK and as expected.

I want to be able to have the same servlet zone name under each domain name,
but the different versions.
ie
domainname.name1/servlets/IsItWorking
is different to
domainname.name2/servlets/IsItWorking

this configuraiton files below show how I did this, I'm sure I'm almost
there... I can taste it....


the reason I want to do this is to enable a development/production
environment on the same server without having to alter references to
servlets when migrating into production. (tried installing multiple versions
of apache on different ports (worked for apache but not apache-Jserv), but
think the virtual hosting method is better.

my configuration files are pasted below, anyone see what I have done wrong??
from httpd.conf
### Section 3: Virtual Hosts
NameVirtualHost 127.0.0.1
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
<VirtualHost nexus.optus.com.au>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot "c:/nexusdraft2/apache/vhost1/htdocs"
    ServerName nexus.optus.com.au
    ErrorLog logs/nexus_optus_com_au.log
    CustomLog logs/nexus_optus_com_auaccess.log common
</VirtualHost>
<VirtualHost develnexus.optus.com.au>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot "c:/nexusdraft2/apache/DevelNexus/htdocs"
    ServerName Develnexus.optus.com.au
    ErrorLog logs/DevelNexus.log
    CustomLog logs/DevelNexusaccess.log common
</VirtualHost>
Include "c:\nexusdraft2\jserv\conf\jserv.conf"

from jserv.properties
wrapper.bin=c:\myweb\jdk1.1.8\bin\java.exe
wrapper.classpath=c:\nexusdraft2\jserv\ApacheJServ.jar
wrapper.classpath=c:\myweb\jsdk2.0\lib\jsdk.jar
bindaddress=localhost
port=8011
zones=root, root1, root2, nexusroot, develnexusroot
root.properties=c:\nexusdraft2\jserv\servlets\zone.properties
root1.properties=c:\nexusdraft2\jserv\servlets1\zone1.properties
root2.properties=c:\nexusdraft2\jserv\servlets2\zone2.properties
nexusroot.properties=c:\nexusdraft2\jserv\nexusservlets\nexuszone.properties
develnexusroot.properties=c:\nexusdraft2\jserv\develnexusservlets\develnexus
zone.properties
pool=false
pool.capacity=10
pool.controller=org.apache.java.recycle.DefaultController
security.selfservlet=true
security.maxConnections=50
security.authentication=false
log.file=c:\nexusdraft2\jserv\logs\jserv.log
log.timestamp=true
log.dateFormat=[dd/MM/yyyy HH:mm:ss:SSS zz]
log.queue.maxage = 5000
log.queue.maxsize = 1000
log.channel.servletException=true
log.channel.jservException=true
log.channel.warning=true
log.channel.servletLog=true
log.channel.critical=true

from jserv.properties
NB: I have commented out
#ApJServMount /servlets /root
#ApJServMount /servlet /root
since I only want to access servlets from a virtualhost (not the default
host)

LoadModule jserv_module "c:\nexusdraft2\jserv\ApacheModuleJServ.dll"
<IfModule mod_jserv.c>
ApJServManual off
ApJServProperties "c:\nexusdraft2\jserv\conf\jserv.properties"
ApJServLogFile "c:\nexusdraft2\jserv\logs\mod_jserv.log"
ApJServLogLevel notice
ApJServDefaultProtocol ajpv12
ApJServDefaultPort 8011
ApJServSecretKey DISABLED
#ApJServMount /servlets /root
#ApJServMount /servlet /root
ApJServMount /servlets1 /root1
ApJServMount /servlet1 /root1
ApJServMount /servlets2 /root2
ApJServMount /servlet2 /root2
ApJServMountCopy on
<Location /jserv/>
   SetHandler jserv-status
   order deny,allow
   deny from all
   allow from 127.0.0.1
</Location>
</IfModule>
####
<VirtualHost nexus.optus.com.au>
        <IfModule mod_jserv.c>
                ApJServDefaultPort 8011
                ApJServMount /servlets /nexusroot
                ApJServMount /servlet /nexusroot
        </IfModule>
</VirtualHost>

<VirtualHost develnexus.optus.com.au>
        <IfModule mod_jserv.c>
                ApJServDefaultPort 8011
                ApJServMount /servlets /develnexusroot
                ApJServMount /servlet /develnexusroot
        </IfModule>
</VirtualHost>

my hosts file has
127.0.0.1       nexus.optus.com.au
127.0.0.1       develnexus.optus.com.au



>From: Olle Olsson <[EMAIL PROTECTED]>
>Reply-To: "Java Apache Users" <[EMAIL PROTECTED]>
>To: 'Java Apache Users' <[EMAIL PROTECTED]>
>Subject: RE: virtual hosting multiple sites with jserv
>Date: Wed, 11 Oct 2000 10:11:49 +0200
>
>----------------------------------------------------------------
>BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
>WHEN YOU POST, include all relevant version numbers, log files,
>and configuration files.  Don't make us guess your problem!!!
>----------------------------------------------------------------
>
>Hi Matthew,
>
>have you tested that your servlets isn't working like
>http://your.ip.address/servlets/domain1/TheActualServlet
>
>(That's the way it is working for me right now. :-(
>  As you might have noticed in my question earlier. But if not...)
>
>Other hints:
>o If "ApJservMount" is not misspelled (instead of "ApJServMount")
>o "/IfModule" should be written as "</IfModule> in the section
>   <IfModule mod_jserv.c>
>                        ApJServDefaultPort 8007
>                        ApJServAction .gsp /servlets/gsp
>                        ApJServMount /servlets /domain1
>   /IfModule
>
>Regards,
>Olle
>
>-----Original Message-----
>From: Matthew Taylor [mailto:[EMAIL PROTECTED]]
>Sent: den 11 oktober 2000 03:10
>To: [EMAIL PROTECTED]
>Subject: virtual hosting multiple sites with jserv
>
>
>----------------------------------------------------------------
>BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
>WHEN YOU POST, include all relevant version numbers, log files,
>and configuration files.  Don't make us guess your problem!!!
>----------------------------------------------------------------
>
>I'm sooo close to getting this to work it hurts....
>
>currently running apache1.3.12, jserv 112 on win32 - NT (prefer to run on
>*nix, office politics... :(  )
>
>have apache/jserv running as a standalone no problem.
>
>managed to get virtual host working ok with apache only, no problem.
>
>What I want to achieve is environments for  development/Quality
>Assurance/Production running with the same servlet zone name so that
>migration between each environment will not require renaming of addresses
>to
>
>call servlets.
>
>I have been using (among others) the java FAQ entry "I'm hoping to use the
>same zone name (but as separate zones) for two domains on the same
>machine."
>
>Did the first 1/2, editing/configuring httpd.conf, jserv.conf,
>jserv.properties and creating new servlet-zone.properties for each of the
>environments.
>
>up to this.
>XXXXXXXx
>in your domain1.properties:
>repositories=/path/to/directory/with/servlets/class/files/domain1
>in your domain2.properties:
>repositories=/path/to/directory/with/servlets/class/files/domain2
>XXXXXXXXX
>
>and got the message "Invalid command ApJservMount, perhaps mispelled or
>defined by a module not included in the server configuration.
>
>looking at the howto again I'm not sure of this, I'm using name based
>virtual hosting, ie
>XXXXXX
><VirtualHost Develnexus.optus.com.au>
>     ServerAdmin [EMAIL PROTECTED]
>     DocumentRoot "c:/nexusdraft2/apache/DevelNexus/htdocs"
>     ServerName Develnexus.optus.com.au
>     ErrorLog logs/DevelNexus.log
>     CustomLog logs/DevelNexusaccess.log common
>     ApJServMount /servlets /Develnexus
>     ApJServMount /servlet /Develnexus
></VirtualHost>
>XXXXXXX
>
>the howto says ....
>XXXXXXXX
>Define a different servlet zone for each domain.
>
>        <VirtualHost [IP#]>
>                <IfModule mod_jserv.c>
>                        ApJServDefaultPort 8007
>                        ApJServAction .gsp /servlets/gsp
>                        ApJServMount /servlets /domain1
>                /IfModule
>        /VirtualHost
>
>        <VirtualHost [IP#]>
>                <IfModule mod_jserv.c>
>                        ApJServDefaultPort 8007
>                        ApJServAction .gsp /servlets/gsp
>                        ApJServMount /servlets /domain2
>                /IfModule
>        /VirtualHost
>XXXXXXx
>
>
>not sure if I have read it right, is the second 1/2 meant to go into the
>httpd.conf?? anyone able to point me to a working copy of configuration
>files??
>
>many thanks.
>
>Mat.
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at
>http://profiles.msn.com.
>
>
>
>--
>--------------------------------------------------------------
>Please read the FAQ! <http://java.apache.org/faq/>
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>Search Archives:
><http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
>Problems?:           [EMAIL PROTECTED]
>
>
>--
>--------------------------------------------------------------
>Please read the FAQ! <http://java.apache.org/faq/>
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>Search Archives:
><http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
>Problems?:           [EMAIL PROTECTED]
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to