Re: How to start my application without localhost, only with virtiual host ?

2010-10-30 Thread Pid
/share/tomcat6/webapps/MyNetwork
   Options Indexes MultiViews
   AllowOverride none
   Allow from all
  /Directory
 Location /WEB-INF/
#AllowOverride None
deny from all
 /Location
 
 #RewriteEngine On
 Options +FollowSymLinks
 
 /
 
 Am 27.10.2010, 17:44 Uhr, schrieb Caldarale, Charles R
 chuck.caldar...@unisys.com:
 
 From: M.Arkhypov [mailto:mykhaylo.arkhy...@gmx.net]
 Subject: How to start my application without localhost, only with
 virtiual host ?

 I would like to start my application without localhost,
 only with virtiual host.

 All Host elements are virtual.  The name localhost in the Engine
 and one Host element has nothing to do with 127.0.0.1, but rather it
 simply links the Engine to the default Host.  You must always have
 one default Host, but it can be any of your Host elements.

 Host name=mmmtest.ch
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=true
   Aliasmmmtest.ch/Alias

 You're missing the appBase attribute; the value for that should be
 unique for each Host.

 That's a pointless Alias, since it's the same as the name attribute.

   Context path=
docBase=c:/temp_mmm/apache-tomcat-6.0.29/webapps/examples
reloadable=true allowLinking=true 
   /Context

 It's extremely bad practice to put Context elements in server.xml,
 and very dangerous to share webapps across multiple Host elements.

 The tomcatmanager is reachable on:
 http://mmmtest.ch:8080/manager/html.

 Only because both Host elements are sharing appBase - a really bad
 idea.

 Host name=pcd-testcommunity.de
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=true
   Aliaspcd-testcommunity.de/Alias

 Another useless Alias.

 Context path=
  docBase=/var/lib/tomcat55/webapps/CompetenceNetwork
  reloadable=true allowLinking=true 
 /Context

 Another undesirable location for a Context element.  The webapp
 should be renamed to ROOT, and the Context element placed in
 /var/lib/tomcat55/webapps/ROOT/META-INF/context.xml, and the path
 attribute removed.

 How can I work with tomcatmanager with these configurations?

 You must place a copy of the manager webapp in each Host's appBase
 directory.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
 PROPRIETARY MATERIAL and is thus for use only by the intended
 recipient. If you received this in error, please contact the sender
 and delete the e-mail and its attachments from all computers.


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

 
 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


RE: How to start my application without localhost, only with virtiual host ?

2010-10-29 Thread marhipov


We have this server.xml file: 

Host name=cntest2.de appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=true
  Context path=
   docBase=/usr/share/tomcat6/webapps/MyNetwork
   reloadable=true allowLinking=true /

/Host

If we have no path defined (path=) , there are two networks starting

(catalina.out - part)
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context ''

and later

(catalina.out - part)
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/CompetenceNetwork'

we can access the page by  http://cntest2.de/ - and get redirected to 
http://cntest2.de/login.html. 

If we define the path like path=/MyNetwork.  

Host name=cntest2.de appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=true
  Context path=/MyNetwork
   docBase=/usr/share/tomcat6/webapps/MyNetwork
   reloadable=true allowLinking=true /
/Host

And starts only one network:
(catalina.out - part)
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/CompetenceNetwork'

The page http://cntest2.de/MyNetwork/login.html works fine.

But if we go to the page http://cntest2.de/ the index.html from ROOT is
showing.

So now we did what you said and copied the MyNetwork content (subfolder and
files) to the ROOT directory. Then we see the loginpage
of MyNetwork as expected. But now if we try to login we get URL-redirected
to: http://cntest2.de/pages/#{subUserSessionUtil.startPageAddress}
There is no error shown in the catalina.out, but the
#{subUserSessionUtil.startPageAddress} looks like an uninterpreted handler
call. That works if we access
the network with http://cntest2.de:8080/MyNetwork/login.html. The goal is to
access the network by its configured URL-pattern -
http://cntest2.de/login.html
(and do login etc.)

The question: how can we adjust the server.xml and work with url 
http://cntest2.de/login.html , not with
http://cntest2.de/MyNetwork/login.html ? 

Tnank you



from apache2:

vhost_cn.conf  

  # Update this path to match your conf directory location (put
workers.properties next to httpd.
  # JkWorkersFile /etc/tomcat6/workers.properties
  # Where to put jk shared memory
  # Update this path to match your local state directory or logs directory
  JkShmFile /var/log/apache2/mod_jk.shm
  # Where to put jk logs
  #mmm:
  JkWorkersFile   /usr/share/tomcat6/conf/worker.properties
  #
  # Update this path to match your logs directory location (put mod_jk.log
next to access_log)
  JkLogFile /var/log/apache2/mod_jk.log
  # Set the jk log level [debug/error/info]
  JkLogLevel   info
  # Select the timestamp log format
  JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

NameVirtualHost *

VirtualHost *
 DocumentRoot /usr/share/tomcat6/webapps/MyNetwork
.
 JkMount /* worker1
..
  # Serve html, jpg and gif using httpd
  JkUnMount /*.html ajp13
  JkUnMount /*.jpg  ajp13
  JkUnMount /*.gif  ajp13
 ServerName cntest2.de
 ServerAdmin i...@cntest2.de
 Directory /usr/share/tomcat6/webapps/MyNetwork
  Options Indexes MultiViews
  AllowOverride none
  Allow from all
 /Directory
Location /WEB-INF/
   #AllowOverride None
   deny from all
/Location

#RewriteEngine On
Options +FollowSymLinks

/






n828cl wrote:
 
 From: M.Arkhypov [mailto:mykhaylo.arkhy...@gmx.net] 
 Subject: How to start my application without localhost, only with
 virtiual host ?
 
 I would like to start my application without localhost,
 only with virtiual host.
 
 All Host elements are virtual.  The name localhost in the Engine and
 one Host element has nothing to do with 127.0.0.1, but rather it simply
 links the Engine to the default Host.  You must always have one
 default Host, but it can be any of your Host elements.
 
 Host name=mmmtest.ch
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=true
   Aliasmmmtest.ch/Alias
 
 You're missing the appBase attribute; the value for that should be unique
 for each Host.
 
 That's a pointless Alias, since it's the same as the name attribute.
 
   Context path=
docBase=c:/temp_mmm/apache-tomcat-6.0.29/webapps/examples
reloadable=true allowLinking=true 
   /Context
 
 It's extremely bad practice to put Context elements in server.xml, and
 very dangerous to share webapps across multiple Host elements.
 
 The tomcatmanager is reachable on: 
 http://mmmtest.ch:8080/manager/html.
 
 Only because both Host elements are sharing appBase - a really bad idea.
 
 Host name=pcd-testcommunity.de
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=true
   Aliaspcd-testcommunity.de/Alias
 
 Another useless Alias.
 
 Context path=
  docBase=/var/lib/tomcat55/webapps/CompetenceNetwork
  reloadable=true allowLinking=true

Re: How to start my application without localhost, only with virtiual host ?

2010-10-29 Thread M.Arkhypov


Dear Chuck,

thank you for your attention and reply,

we have done a few of yours advices, but without success:


We have this server.xml file:

Host name=cntest2.de appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=true
  Context path=
   docBase=/usr/share/tomcat6/webapps/MyNetwork
   reloadable=true allowLinking=true /

/Host

If we have no path defined (path=) , there are two networks starting

(catalina.out - part)
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context ''

and later

(catalina.out - part)
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/MyNetwork'

we can access the page by  http://cntest2.de/ - and get redirected to
http://cntest2.de/login.html.

If we define the path like path=/MyNetwork.

Host name=cntest2.de appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=true
  Context path=/MyNetwork
   docBase=/usr/share/tomcat6/webapps/MyNetwork
   reloadable=true allowLinking=true /
/Host

And starts only one network:

(catalina.out - part)
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context  
'/CompetenceNetwork'


The page http://cntest2.de/MyNetwork/login.html works fine.

But if we go to the page http://cntest2.de/ the index.html from ROOT is  
showing.


So now we did what you said and copied the MyNetwork content (subfolder  
and files) to the ROOT directory. Then we see the loginpage of MyNetwork  
as expected. But now if we try to login we get URL-redirected to:


http://cntest2.de/pages/#{subUserSessionUtil.startPageAddress}

There is no error shown in the catalina.out, but the  
#{subUserSessionUtil.startPageAddress} looks like an uninterpreted handler  
call. That works if we access
the network with http://cntest2.de:8080/MyNetwork/login.html. The goal is  
to access the network by its configured URL-pattern -  
http://cntest2.de/login.html

(and do login etc.)

The question: how can we adjust the server.xml and work with url   
http://cntest2.de/login.html , not with  
http://cntest2.de/MyNetwork/login.html ?


Tnank you



conf. from apache2:

vhost_cn.conf

  # Update this path to match your conf directory location (put  
workers.properties next to httpd.

  # JkWorkersFile /etc/tomcat6/workers.properties
  # Where to put jk shared memory
  # Update this path to match your local state directory or logs directory
  JkShmFile /var/log/apache2/mod_jk.shm
  # Where to put jk logs
  #mmm:
  JkWorkersFile   /usr/share/tomcat6/conf/worker.properties
  #
  # Update this path to match your logs directory location (put mod_jk.log  
next to access_log)

  JkLogFile /var/log/apache2/mod_jk.log
  # Set the jk log level [debug/error/info]
  JkLogLevel   info
  # Select the timestamp log format
  JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

NameVirtualHost *

VirtualHost *
 DocumentRoot /usr/share/tomcat6/webapps/MyNetwork
.
 JkMount /* worker1
..
  # Serve html, jpg and gif using httpd
  JkUnMount /*.html ajp13
  JkUnMount /*.jpg  ajp13
  JkUnMount /*.gif  ajp13
 ServerName cntest2.de
 ServerAdmin i...@cntest2.de
 Directory /usr/share/tomcat6/webapps/MyNetwork
  Options Indexes MultiViews
  AllowOverride none
  Allow from all
 /Directory
Location /WEB-INF/
   #AllowOverride None
   deny from all
/Location

#RewriteEngine On
Options +FollowSymLinks

/

Am 27.10.2010, 17:44 Uhr, schrieb Caldarale, Charles R  
chuck.caldar...@unisys.com:



From: M.Arkhypov [mailto:mykhaylo.arkhy...@gmx.net]
Subject: How to start my application without localhost, only with  
virtiual host ?



I would like to start my application without localhost,
only with virtiual host.


All Host elements are virtual.  The name localhost in the Engine  
and one Host element has nothing to do with 127.0.0.1, but rather it  
simply links the Engine to the default Host.  You must always have  
one default Host, but it can be any of your Host elements.



Host name=mmmtest.ch
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=true
  Aliasmmmtest.ch/Alias


You're missing the appBase attribute; the value for that should be  
unique for each Host.


That's a pointless Alias, since it's the same as the name attribute.


  Context path=
   docBase=c:/temp_mmm/apache-tomcat-6.0.29/webapps/examples
   reloadable=true allowLinking=true 
  /Context


It's extremely bad practice to put Context elements in server.xml, and  
very dangerous to share webapps across multiple Host elements.



The tomcatmanager is reachable on:
http://mmmtest.ch:8080/manager/html.


Only because both Host elements are sharing appBase - a really bad  
idea.



Host name=pcd-testcommunity.de
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware

How to start my application without localhost, only with virtiual host ?

2010-10-27 Thread M.Arkhypov


Hi Tomcat - Users,

I use Tomcat 6.0.29 on a Suse 11.1 Linux Server and I would like to start  
my application without localhost, only with virtiual host.


On Windows it works already.
Here is the server.xml:

 !--
Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
/Host
--

  Host name=mmmtest.ch
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=true
Aliasmmmtest.ch/Alias
Context path=
 docBase=c:/temp_mmm/apache-tomcat-6.0.29/webapps/examples
 reloadable=true allowLinking=true 
/Context
 /Host

Now I can reach the network with the URL: http://mmmtest.ch/.
The tomcatmanager is reachable on: http://mmmtest.ch:8080/manager/html.


The server.xml:

 !-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector port=8080 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   connectionTimeout=2 disableUploadTimeout=true /
Connector port=8010
   enableLookups=false redirectPort=8443  
protocol=AJP/1.3 /


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=pcd-testcommunity.de
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=true
Aliaspcd-testcommunity.de/Alias
 Context path=
 
docBase=/var/lib/tomcat55/webapps/CompetenceNetwork
 reloadable=true allowLinking=true 
 /Context
 /Host

/Engine

  /Service

/Server

The network is reachable on pcd-testcommunity.de. If I try to reach the  
tomcatmanager with http://pcd-testcommunity.de:8081/manager/html, I get an  
ERROR 404.

How can I work with tomcatmanager with these configurations?

Greetings

Michael Arkhypov, Softwareentwickler

Lyncker  Theis GmbH
Wilhelmstr. 16
65185 Wiesbaden
Germany

Fon +49 611/89038960
Fax +49 611/9406125

Handelsregister: HRB 23156 Amtsgericht Wiesbaden
Steuernummer: 04323897052
USt-IdNr.: DE255806399

Geschäftsführer:
Filip Lyncker,
Armin Theis

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