tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: server.xml (with mod_jk configuration) being rewritten
Date Thu, 15 May 2003 20:49:28 GMT

You can start Tomcat on port 80 just fine.  The only reason that Tomcat 
uses port 8080 is to avoid interfering with existing web servers.  You can 
always change this in server.xml.  If you are only using mod_jk to be able 
to use port 80, then this is the best course of action.

As far as Tomcat not re-writing mod_jk.conf upon hot deploy, you are either 
going to have to live with that or create a patch for Tomcat and submit it 
to the Tomcat developers.  I don't think you'll get very far on that one, 
though.  And then, of course, Apache has to be restarted to re-read the 
file.  What I usually do is create a separate mod_jk.conf and add all the 
stuff that I think I will ever map into it....even if the app isn't 
currently deployed.  When it is deployed, it will work because Apache will 
already know about it and Tomcat doesn't have to worry about re-writing it.

Again, if something is being removed from server.xml upon rewrite, report 
it as a bug.  If you joust talk about it here, nothing will be done to fix it.

Jake

At 04:41 PM 5/16/2003 -0300, you wrote:
>Thanks for your response jacob.
>
>I'm posting both server.xml's before and post rewriting.  server.xml is 
>the rewritten, and GOOD is the right one :)
>
>
>About the defeats of using Apache : I don't want that the users to use 
>port 8080 to access tomcat app's directly, i thought that this would be 
>the objective of the mod_jk.
>
>Ii will use deploy task. so the next time i start tomcat it deploys my 
>app, in the startup.sh script I copy my GOOD version of server.xml int he 
>place of the rewritten server.xml. so far so good. But i just found a very 
>big problem : tomcat doesn't regenerates the mod_jk.conf when I deploy a 
>new app, it should have a tomcat ant task to make it rewrite the mod_jk.conf.
>Besides that, apache doenst' rereads the mod_jk.conf when it changes, so 
>thats' no use for "hot-deploy" if I use redirection by apache, i do must 
>restart both :(
>
>any comments?????
>
>
>Jacob Kjome wrote:
>
>>
>>The ant "deploy" task definitely will cause Tomcat to rewrite the 
>>server.xml. This is to persist the information about the context so it 
>>can serve it up after a restart.  However, the server.xml rewrite 
>>shouldn't remove data (other than comments) from the server.xml.  What it 
>>does seem to do is write each element with every possible attribute, but 
>>that isn't a big deal.  If some of your non-commented elements in 
>>server.xml are being removed upon server.xml rewrite, then you should 
>>report this as a bug to http://nagoya.apache.org/bugzilla/ .
>>
>>BTW, using Apache with a context deployed via the ant manager "deploy" 
>>task kind of defeats the purpose of using Apache.  Usually, the idea is 
>>to let Apache serve static content to take the burden off of Tomcat so it 
>>can peacefully serve dynamic content.  However, since context's deployed 
>>via the ant manager "deploy" task are served directly from the .war file, 
>>there is no static content for Apache to serve since Apache requires the 
>>context to be in a directory, not in a .war file.
>>
>>You might want to use the ant manager "install" task instead of the 
>>"deploy" task.  The server.xml will not be rewritten.  However, upon each 
>>restart of Tomcat, you will have to do the install again because it is 
>>not persisted across restarts.
>>
>>Jake
>>
>>At 08:25 PM 5/15/2003 -0300, you wrote:
>>
>>>please, anyone could answer me? i'm without clues. I have to use 
>>>auto-conf of apache and remote deploy of tomcat. but remote-deploy 
>>>changes the server.xml, loosing the configuration of mod_jk (it rewrites 
>>>the server.xml), so the next time i startup apache and/or tomcat, it 
>>>will not get the configuration of mod_jk. Any clue???????????
>>>
>>>thanks in advance
>>>Emerson
>>>
>>>
>>>Emerson Cargnin wrote:
>>>
>>>>when I deploy a new app into tomcat, my server.xml (with mod_jk 
>>>>configuration) is being rewritten, so the next time I restart apache 
>>>>and Tomcat it does not take in account my configuration. I need to 
>>>>change the  server.xml in evert apache and tomcat restart? And the 
>>>>contexts created dnamically through deploy ant taks?
>>>>
>>>>I need to solve this because feature  ( automatically deploy  4.1) was 
>>>>the reason to use auto-conf of apache-tomcat.
>>>
>>>
>>>--
>>>Emerson Cargnin
>>>Analista de Sitemas
>>>Setor de Desenvolvimento de Sistemas - TRE-SC
>>>tel : (048) - 251-3700 - Ramal 3181
>>>
>>>
>>>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message