Some Web servers do log file rotation, where the Web server creates a new log file after a specified period without restarting. New file names are autogenerated so they don't clash with existing files. On most systems, Web servers generate new log files every 24 hours. With a log file rotation, you can adopt an archiving
system, such as putting the log files on tape once a week, then freeing up space on the Web server.
Provide one more Parameter with the TIMEFACTOR and that is offset in our case this is 330 as our TimeZone is GMT +5:30 and OFFSET time
calculation is like 5*60 = 300 and plus 30 for the 5:30 this will rotate exactly at the system date changeover.
all this is depends upon the TIME ZONE used by the servers, in the above case i have calculated it as standard time zone for india it is GMT +5:30 and accordingly our IBM Http Server needs to be configured for loggings, virtual host directives must be modified for this its mentioned below.
<VirtualHost www.MyTestSite.com>
DocumentRoot "D:\IHS\htdocs\MyTestSite"
ServerName www.MyTestSite.com
ErrorLog "|rotatelogs logs/site_1/error_%d%m%Y.log 86400 330"
CustomLog "|rotatelogs logs/site_1/access_%d%m%Y.log 86400 330" combined
</VirtualHost>
Saturday, December 11, 2010
Synchronise IHS server logs with the System Date
IHS Server operations
Some IHS Server operations are listed here i know it is not difficult to manage with help utility but for easy reference its given here.
Start/Stop your server thro' the command lne params.
apache -k start -f "D:\IBM\IBM HTTP Server\conf\httpd.conf"
apache -k stop -f "D:\IBM\IBM HTTP Server\conf\httpd.conf"
This will install the Apache services as windows nt service
apache -k install -n "IHS_1" -f "D:\IBM\IBM HTTP Server\conf\httpd.conf"
apache -k install -n "IHS_2" -f "D:\IBM\IBM HTTP Server\conf\httpd2.conf"
Note: Provide different log file names and different PID files to run both the servers simultaneously on to a single windows server.
Start/Stop your server thro' the command lne params.
apache -k start -f "D:\IBM\IBM HTTP Server\conf\httpd.conf"
apache -k stop -f "D:\IBM\IBM HTTP Server\conf\httpd.conf"
This will install the Apache services as windows nt service
apache -k install -n "IHS_1" -f "D:\IBM\IBM HTTP Server\conf\httpd.conf"
apache -k install -n "IHS_2" -f "D:\IBM\IBM HTTP Server\conf\httpd2.conf"
Note: Provide different log file names and different PID files to run both the servers simultaneously on to a single windows server.
Configure IIS with Multiple Tomcat Instances
Configuring IIS 6.0 with Multiple Tomcat 5.5 server instances is described best in the document uploaded here.its about the IIS and more than 1 tomcat server on to the single windows 2003 server.
Click to Download the Document.
Click to Download the Document.
Tomcat LoadBalancing
For this you need a webapp called balancer using this you can do this.
Sample Configuration
The default balancer installation uses a single filter, BalancerFilter, mapped to all requests (url-pattern /*). The filter reads its rules from the location specified in the balancer deployment descriptor (web.xml file). The default rules are:
Redirect requests with News in the URL to http://www.site1.com/
Redirect requests with a parameter named paramName whose value is paramValue to http://www.site2.com/.
Redirect all other requests to jakarta.apache.org.
Therefore, when you install tomcat, start it, and point your browser to http://localhost:8080/balancer, you will be redirected to http://jakarta.apache.org/. If you point your browser to http://localhost:8080/balancer/News you will be redirected to http://www.site1.com/. The request for http://localhost:8080/balancer/BlahBlah?paramName=paramValue will be redirected to http://www.site2.com/.
Balancer Rules
A Rule in the balancer system is a combination of a request matching criterion and a redirection URL for matching requests. Rules implement the org.apache.webapp.balancer.Rule interface.
The balancer distribution contains a number of useful rules. The framework is also designed for easy extensibility so that you can write your own rules quickly. Rules should be JavaBeans (public no-args constructor, public setter method setXXX for property xxx), as they are instantiated by Jakarta Commons Digester. Feel free to inquire on the tomcat-user mailing list regarding the availability of rules or the inclusion of your rules in the distribution.
Rules are assembled into RuleChains. Each BalancerFilter (or Servlet/JSP) refers to one RuleChain when making its redirection decisions. Note that you are not restricted to having one filter mapped to /* as done in the sample configuration. You can configure as many filters as desired, using the full filter mapping possibilities defined in the Servlet Specification. Each filter will have its own RuleChain
How it Works
You write a rules configuration file containing various rules and redirection locations.
You define the balancer filter in your web.xml, mapping it as desired (/* is a common use-case) and configuring it with your rules configuration file.
The server is started, initializing the filter.
A request comes into the server. The filter consults its rule chain to determine where to redirect the request. Rules are consulted in the order in which they are defined in the rules configuration file. The first matching rule will stop the evaluation and cause the request to be redirected.
Sample Configuration
The default balancer installation uses a single filter, BalancerFilter, mapped to all requests (url-pattern /*). The filter reads its rules from the location specified in the balancer deployment descriptor (web.xml file). The default rules are:
Redirect requests with News in the URL to http://www.site1.com/
Redirect requests with a parameter named paramName whose value is paramValue to http://www.site2.com/.
Redirect all other requests to jakarta.apache.org.
Therefore, when you install tomcat, start it, and point your browser to http://localhost:8080/balancer, you will be redirected to http://jakarta.apache.org/. If you point your browser to http://localhost:8080/balancer/News you will be redirected to http://www.site1.com/. The request for http://localhost:8080/balancer/BlahBlah?paramName=paramValue will be redirected to http://www.site2.com/.
Balancer Rules
A Rule in the balancer system is a combination of a request matching criterion and a redirection URL for matching requests. Rules implement the org.apache.webapp.balancer.Rule interface.
The balancer distribution contains a number of useful rules. The framework is also designed for easy extensibility so that you can write your own rules quickly. Rules should be JavaBeans (public no-args constructor, public setter method setXXX for property xxx), as they are instantiated by Jakarta Commons Digester. Feel free to inquire on the tomcat-user mailing list regarding the availability of rules or the inclusion of your rules in the distribution.
Rules are assembled into RuleChains. Each BalancerFilter (or Servlet/JSP) refers to one RuleChain when making its redirection decisions. Note that you are not restricted to having one filter mapped to /* as done in the sample configuration. You can configure as many filters as desired, using the full filter mapping possibilities defined in the Servlet Specification. Each filter will have its own RuleChain
How it Works
You write a rules configuration file containing various rules and redirection locations.
You define the balancer filter in your web.xml, mapping it as desired (/* is a common use-case) and configuring it with your rules configuration file.
The server is started, initializing the filter.
A request comes into the server. The filter consults its rule chain to determine where to redirect the request. Rules are consulted in the order in which they are defined in the rules configuration file. The first matching rule will stop the evaluation and cause the request to be redirected.
Setting up of Tomcat Heap Size in versions like 4.0
Earlier Version of Tomcat Like 4.*.* there is no GUI to set the JVM Heap Size in such cases u can set the Java Heap Size in following way
Set one variable in your System Enviornment as
VariableName:->JAVA_OPTS
VariableValue:-> -Xms64m -Xmx128m
This will solve ur heap size issue
If you r using catalina_home then u must define as CATALINE_OPTS as the above value....
Set one variable in your System Enviornment as
VariableName:->JAVA_OPTS
VariableValue:-> -Xms64m -Xmx128m
This will solve ur heap size issue
If you r using catalina_home then u must define as CATALINE_OPTS as the above value....
Apache Tomcat as windows service
below command will create a Tomcat Server as windows service if you are not installing it thro the binarys.
SC create tomcatRN binpath= D:\apache-tomcat-5.5.16\bin\startup.bat DisplayName= Tomcat_5050
[SC] CreateService SUCCESS
SC create tomcatRN binpath= D:\apache-tomcat-5.5.16\bin\startup.bat DisplayName= Tomcat_5050
[SC] CreateService SUCCESS
Subscribe to:
Posts (Atom)