Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Halo Gurus

I have a problem with setting a new hosts in Tomcat6 host-manager application. Host-manager application works very well. Everything works. But when restart the server, all settings are lost. I have to everything set up again.

1.I start Tomcat6 host-manager

http://localhost:8080/host-manager/html

2.Set up Hosts

3.Everything works

4.Restart server

/sbin/service restart tomcat6

6.The settings are lost. There are not Hosts. I have to all set up again.
goto 1

note:
I use CentOS5 and Tomcat6

Thanks a lot
Tom

share|improve this question
    
I have the exact same problem with tomcat7+debian setup. –  Ernest Jul 10 '13 at 8:44
add comment

2 Answers

The same thing here.

I even tried to find the source code of host-manager but seems no much info about this, and people seems don't use this much.

I found no virtual host settings in server.xml I just added via host-manager. So it turns out that host-manager applies the change on the fly and undo it when tomcat shuts down.

So I just forget about the host-manager, and configure the virtual host directly in the server.xml. :D

share|improve this answer
add comment

While I don't have a lot of experience with this subset of Tomcat, the webapp is used to manipulate the Hosts containers that are in server.xml:

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html

I don't know if this tool is supposed to save (write) changes to the core Tomcat config files or not, so you might check the write permissions on server.xml (and others in conf/) to see if the user running Tomcat6 has privileges to make updates to this file. If, in fact, this is what it's supposed to do - if not, perhaps you're supposed to make those changes by hand?

For instance, in MySQL you can dynamically change a lot of variables at runtime which are lost when you restart unless you also, by hand, update the /etc/my.cnf file as well. It's possible this host-manager webapp is the same concept in that it's only adjusting runtime values.

share|improve this answer
    
Hi troyengel thank for reply. I mean the same, but it not work. I try to change permission file server.xml to 666. Thank Tom –  Tomas Aug 29 '10 at 18:52
    
I can set a virtual host in file server.xml. But I was surprised by the behavior of host-manager. –  Tomas Aug 29 '10 at 18:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.