Hosts and ROOT folder

2014-05-27 Thread Michael Salmon
Hi all

I'am new to Tomcat, so please do not kill me if the issue is simple or my 
english is bad.

I'am running Tomcat 7.0.42 on WinServer 2012 R2. It is front end for a Digital 
Asset Management system. The Tomcat is installed as part of the DAM system and 
could be different from a plain vanilla install.

My problem is Host and path to webapps.

I basically only have one webapp witch is duplicated when I get a new customer.

But when I deploy a new webapp and make a host element in conf\server.xml, I 
have to make a folder named ROOT  in my webapp (webapps/customer/ROOT) and move 
all files to this folder to get things working. We also did that in a very old 
version (3 or 4), but haven't done that in several years.
I can see the default webapp is also in a ROOT folder.

When I put the files in the ROOT folder my application guy can't see the site 
in his administration tool for the DAM system.

Where is it defined that files for my webapps goes in a ROOT folder?

I tried to make a folder in conf/Catalina/ reflecting the name of the webapp, I 
can't get that to work either.
My last try will be to define docbase in the host element in server.conf, but 
in the documentation this is not recommended.

All help would be appreciated. If you need more info please tell me.

Thanks


Venlig hilsen / Best regards

Michael Salmon IT-Chef
t: +45 87 95 55 43
m: +45 24 86 40 08

[datagraf]http://www.datagraf.dk/
Jaegerg?rdsgade 122, DK-8000 Aarhus C * t: +45 87 95 55 55 * 
www.datagraf.dkhttp://www.datagraf.dk



Re: Hosts and ROOT folder

2014-05-27 Thread Mark Thomas
On 27/05/2014 09:32, Michael Salmon wrote:
 Hi all
 
 I'am new to Tomcat, so please do not kill me if the issue is simple or my 
 english is bad.

We won't kill you. We might point you towards some documentation though ;)

And don't worry about your English. I am sure it is orders of magnitude
better than most of us here could manage in your native language.

 I'am running Tomcat 7.0.42 on WinServer 2012 R2. It is front end for a 
 Digital Asset Management system. The Tomcat is installed as part of the DAM 
 system and could be different from a plain vanilla install.
 
 My problem is Host and path to webapps.
 
 I basically only have one webapp witch is duplicated when I get a new 
 customer.
 
 But when I deploy a new webapp and make a host element in conf\server.xml, I 
 have to make a folder named ROOT  in my webapp (webapps/customer/ROOT) and 
 move all files to this folder to get things working. We also did that in a 
 very old version (3 or 4), but haven't done that in several years.
 I can see the default webapp is also in a ROOT folder.
 
 When I put the files in the ROOT folder my application guy can't see the site 
 in his administration tool for the DAM system.
 
 Where is it defined that files for my webapps goes in a ROOT folder?
 
 I tried to make a folder in conf/Catalina/ reflecting the name of the webapp, 
 I can't get that to work either.
 My last try will be to define docbase in the host element in server.conf, but 
 in the documentation this is not recommended.
 
 All help would be appreciated. If you need more info please tell me.

OK. The simplest thing will be to provide us with the following:
1) Your full server.xml. Please remove all comments and replace any
sensitive information (e.g. passwords, customer names etc.)

2) The file structure under webapps.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hosts and ROOT folder

2014-05-27 Thread André Warnier

Michael Salmon wrote:

Hi all

I'am new to Tomcat, so please do not kill me if the issue is simple or my 
english is bad.

I'am running Tomcat 7.0.42 on WinServer 2012 R2. It is front end for a Digital 
Asset Management system. The Tomcat is installed as part of the DAM system and 
could be different from a plain vanilla install.

My problem is Host and path to webapps.

I basically only have one webapp witch is duplicated when I get a new customer.

But when I deploy a new webapp and make a host element in conf\server.xml, I 
have to make a folder named ROOT  in my webapp (webapps/customer/ROOT) and move 
all files to this folder to get things working. We also did that in a very old 
version (3 or 4), but haven't done that in several years.
I can see the default webapp is also in a ROOT folder.

When I put the files in the ROOT folder my application guy can't see the site 
in his administration tool for the DAM system.

Where is it defined that files for my webapps goes in a ROOT folder?

I tried to make a folder in conf/Catalina/ reflecting the name of the webapp, I 
can't get that to work either.
My last try will be to define docbase in the host element in server.conf, but 
in the documentation this is not recommended.

All help would be appreciated. If you need more info please tell me.



Well, you're right, it's hard not to kill you, but we will try.  This list 
would quickly
get boring if we killed all the newcomers.  And I personally welcome that kind 
of question
anway, because it is one of the few kinds which I can answer, so I get bonus 
points.

First, a note : whenever possible, you should try to avoid modifying 
conf/server.xml.
That's mainly because if you make a change there, you have to restart Tomcat to 
make it
notice.
But in your case, if you create a new Host for each new customer, there is no 
other way,
so keep doing it.

Some data : each Host in server.xml has its own appBase, which is the top 
directory in
which webapps (also named context) for that Host are located.
By default, this is webapps, which is a relative location, which by default 
points to :
(tomcat-installation-directory)/webapps/.
But you can create another directory somewhere, and point the appBase of 
another Host to
this new directory, and then this Host will look in that place for its own 
webapps.

Normally, any given application (or webapp or context) is accessed by a URL 
of the
form : http://hostname[:port]/webapp-name/
where webapp-name is the name of a sub-directory just below the appBase 
directory for
that Host.
So
- if your application would be (imaginatively) named myWebApp
- and your Host name would be (imaginatively) named customer1.customers.com
- and the corresponding Host tage would be like
  Host name=customer1.customers.com appBase=C:/websites/customer1/webapps/ 
...
then
- the place to put your application would be in 
C:/websites/customer1/webapps/myWebApp/
- and the customer would access it via a URL like :
  http://customer1.customers.com/myWebApp/...;

Then, one more thing :
If you want your application to be the default webapp, which the user could 
call up with
a URL like : http://customer1.customers.com/
then you have to do the following :
- create a directory C:/websites/customer1/webapps/ROOT/
- and place your application there
(That name ROOT (in capitals, important) is interpreted by Tomcat in a 
special way, so
that if Tomcat does not recognise the name of the application requested in the 
URL, it
will default to looking there). (Kind of).

Of course, for all of this to work (and for the users to be able to get to that
webserver), the name customer1.customers.com would have to be registered in 
the DNS
system, with the IP address of your Tomcat server.

Hope this helps.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



SV: Hosts and ROOT folder

2014-05-27 Thread Michael Salmon
 sortingstate.jspx
27-05-2014  07:10 1.376 sso.jspx
27-05-2014  07:10 2.802 switchsession.jspx
02-05-2014  07:35DIR  themes
27-05-2014  07:10 1.670 thumbnailslidercontainer.jspx
27-05-2014  07:1014.728 thumbnailview.jspx
27-05-2014  07:1013.562 tooltipinfoview.jspx
27-05-2014  07:10   878 updaterecord.jspx
27-05-2014  07:10 4.973 uploadahsandtemplates.jspx
27-05-2014  07:1015.575 uploadcategoryview.jspx
27-05-2014  07:10 5.703 uploadcollection.jspx
27-05-2014  07:10 5.625 uploadcollectionbody.jspx
27-05-2014  07:10 1.629 uploadcollectionheader.jspx
27-05-2014  07:10 5.004 uploadcollectionlogin.jspx
27-05-2014  07:10 2.229 uploadcollectionlogincheck.jspx
27-05-2014  07:10 1.606 uploadcollectionname.jspx
27-05-2014  07:10 2.991 uploadcollectionrecordslist.jspx
27-05-2014  07:10 6.938 uploadcollectionsites.jspx
27-05-2014  07:10 5.102 uploadconfiguration.jspx
27-05-2014  07:10 1.259 uploadpanel.jspx
27-05-2014  07:10 4.142 uploadstate.jspx
27-05-2014  07:10   989 usercommenthandler.jspx
27-05-2014  07:10   736 validaterecord.jspx
27-05-2014  07:10 1.739 viewchooser.jspx
02-05-2014  11:38DIR  WEB-INF
 171 File(s)876.824 bytes
   8 Dir(s)  24.443.654.144 bytes free

C:\Program Files\Canto\Cumulus Web Solutions\apache-tomcat-7.0.42\webapps\coop\R
OOT




Venlig hilsen / Best regards

Michael Salmon IT-Chef
t: +45 87 95 55 43
m: +45 24 86 40 08

[datagraf]http://www.datagraf.dk/
Jægergårdsgade 122, DK-8000 Aarhus C · t: +45 87 95 55 55 · 
www.datagraf.dkhttp://www.datagraf.dk

Fra: Michael Salmon [mailto:michael.sal...@datagraf.dk]
Sendt: 27. maj 2014 12:59
Til: Tomcat Users List
Emne: SV: Hosts and ROOT folder


Hi



Here is my server.xml



?xml version='1.0' encoding='utf-8'?



Server port=8005 shutdown=SHUTDOWN



  Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /

  !--Initialize Jasper prior to webapps are loaded. Documentation at 
/docs/jasper-howto.html --

  Listener className=org.apache.catalina.core.JasperListener /

  !-- Prevent memory leaks due to use of particular java/javax APIs--

  Listener 
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /

  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

  Listener 
className=org.apache.catalina.core.ThreadLocalLeakPreventionListener /





  GlobalNamingResources



Resource name=UserDatabase auth=Container

  type=org.apache.catalina.UserDatabase

  description=User database that can be updated and saved

  factory=org.apache.catalina.users.MemoryUserDatabaseFactory

 pathname=conf/tomcat-users.xml /

  /GlobalNamingResources





  Service name=Catalina











Connector port=80 protocol=HTTP/1.1

   connectionTimeout=2



   redirectPort=8443

   compression=on

   compressionMinSize=2048

   noCompressionUserAgents=gozilla, traviata

   
compressableMimeType=text/html,text/xml,text/css,application/javascript /







Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /











Engine name=Catalina defaultHost=localhost





  Realm className=org.apache.catalina.realm.LockOutRealm



Realm className=org.apache.catalina.realm.UserDatabaseRealm

   resourceName=UserDatabase/

  /Realm



  
ns:FindAddsSubCategories1/ns:FindAddsSubCategories



   Host name=localhost  appBase=webapps

unpackWARs=true autoDeploy=true





Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs

   prefix=localhost_access_log. suffix=.txt

   pattern=%h %l %u %t quot;%rquot; %s %b /



  /Host

   Host name=nilfisk-alto debug=0 
appBase=webapps/nilfisk-alto unpackWARs=true


   Aliasnilfisk-alto.datagraf.dk/Alias


   Logger className=org.apache.catalina.logger.FileLogger


   directory=logs prefix=virtual_nilfisk-alto. suffix=.log 
timestamp=true/

   /Host

   Host name=coop debug=0 
appBase=webapps/coop unpackWARs=true


   Aliascoop.datagraf.dk/Alias


   Logger

Re: SV: Hosts and ROOT folder

2014-05-27 Thread Mark Thomas
On 27/05/2014 11:59, Michael Salmon wrote:
 Hi

 
 Here is my server.xml

snip/

 Host name=localhost  appBase=webapps unpackWARs=true autoDeploy=true
 
   Valve className=org.apache.catalina.valves.AccessLogValve 
 directory=logs
  prefix=localhost_access_log. suffix=.txt
  pattern=%h %l %u %t quot;%rquot; %s %b /
 /Host   
 
 Host name=nilfisk-alto debug=0 appBase=webapps/nilfisk-alto 
 unpackWARs=true
   Aliasnilfisk-alto.datagraf.dk/Alias
   Logger className=org.apache.catalina.logger.FileLogger
directory=logs prefix=virtual_nilfisk-alto. suffix=.log
timestamp=true/
 /Host   

snip/

The problem is that you have overlapping appBase settings between
virtual hosts.

The simplest solution is to change the appBase for localhost to
webapps/localhost and move any web applications in webapps into
webapps/localhost.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org