Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Separating 'per instance' data from binaries and web sites

When you install Apache httpd or Apache Tomcat, everything goes into a single directory tree. That's the most natural way for the servers to ship as it means that they can be installed, tested, and then removed again easily if you wish without any complex procedure being involved.

But for a live environment, chances are you'll want to split the data into a separate directory area (that way, you can upgrade the server but retain the web site later) and you might even want to place the read-only files such as the executable binaries on a shared resource, but leave the configuration files and log files in a separate (third) area. Here are some tips / summary schemes for setting these up

Apache httpd

1. Split out the log and conf directories to the new RW area
2. Change the DocumentRoot directive in the configuration file, and also the Directory permissions directive that relates to it.
3. Create the new document root directory
4. Change /etc/init.d to start up using the -d and -f options to apachectl in the start section
5. Ensure that ServerRoot is COMMENTED OUT httpd.conf
6. Restart the Apache httpd server

Note - you can then use an environment variable input to the /etc/init.d/httpd script to control where the various parts are located

Apache Tomcat

1. Stop the Tomcat Server
2. Move the webapps directory to the new data (website) area and change the server.xml to reflect the change - alter the value for the appBase property in the Host tag
3. Create a new directory for the Read/Write area and move the conf and log subdirectories there
4. Set the CATALINA_BASE environment variable to point to the read/write area
5. Restart Tomcat using ./bin/catalina.sh start
(written 2005-10-16 21:13:45)

 
Associated topics are indexed under
A603 - Web Application Deployment - Further httpd Configuration
A656 - Web Application Deployment - More Tomcat Configuration

Back to
Changing Tomcat's web.xml and reloading a web application
Previous and next
or
Horse's mouth home
Forward to
Tell them three times
Some other Articles
I wanna be a Python trainer
Yesterday was Kiss and Ride
Stand alone PHP programs
Tell them three times
Separating 'per instance' data from binaries and web sites
Changing Tomcat's web.xml and reloading a web application
Technical Loneliness
Splitting the difference
Big number
Shortened interactive commands
2259 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2009: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho