<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux infrastructure support and bash scripting, Unix/Linux System administration &#187; Tomcat / jboss application server</title>
	<atom:link href="http://sysadminupdates.com/blog/category/tomcat-jboss-application-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://sysadminupdates.com/blog</link>
	<description>Linux infrastructure support and bash scripting, Unix/Linux System administration</description>
	<lastBuildDate>Fri, 03 Sep 2010 03:12:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to catch 500 error from error logs in apache</title>
		<link>http://sysadminupdates.com/blog/2010/06/24/how-to-catch-500-error-from-error-logs-in-apache/</link>
		<comments>http://sysadminupdates.com/blog/2010/06/24/how-to-catch-500-error-from-error-logs-in-apache/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 05:51:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Operating System]]></category>
		<category><![CDATA[Monitoring process]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tomcat / jboss application server]]></category>
		<category><![CDATA[Trouble shooting]]></category>
		<category><![CDATA[Web server]]></category>
		<category><![CDATA[dedicated server set up]]></category>
		<category><![CDATA[linux unix issues and fixes]]></category>

		<guid isPermaLink="false">http://sysadminupdates.com/blog/?p=72</guid>
		<description><![CDATA[Catch 500 error]]></description>
			<content:encoded><![CDATA[<p>A. Enable cgi for your apache. Add following.</p>
<p>1) LoadModule cgid_module modules/mod_cgid.so</p>
<p>2)</p>
<p>&lt;Directory &#8220;/appl/apache2/cgi-bin&#8221;&gt;</p>
<p>AllowOverride None</p>
<p>Options ExecCGI</p>
<p>Order allow,deny</p>
<p>Allow from all</p>
<p>&lt;/Directory&gt;</p>
<p>3)</p>
<p>ScriptAlias /cgi-bin/ &#8220;/appl/apache2/cgi-bin/&#8221;</p>
<p>AddHandler cgi-script .cgi</p>
<p>ErrorDocument 413 /cgi-bin/error.cgi</p>
<p>4) Restart apache.</p>
<p>B. Set up the following python script to catch this error, send an email to admin and give the custome message to users.</p>
<p>/appl/apche/cgi-bin/error.cgi</p>
<p>chmod +x /appl/apache/cgi-bin/error.cgi</p>
<p>#!/usr/bin/python<br />
import sys, os<br />
SENDMAIL = &#8220;/usr/sbin/sendmail&#8221; # sendmail location<br />
print &#8220;Content-Type: text/html\n\n&#8221;;<br />
if (os.environ["REDIRECT_STATUS"] == &#8220;413&#8243;) or (os.environ["REDIRECT_STATUS"] == &#8220;500&#8243;):<br />
stats = &#8220;&lt;table border=1&gt;&lt;tr&gt;&lt;td&gt;Variable&lt;/td&gt;&lt;td&gt;Value&lt;/td&gt;&lt;/tr&gt;&#8221;<br />
for name, value in os.environ.items():<br />
stats += &#8220;&lt;tr&gt;&lt;td&gt;%s&lt;/td&gt;&lt;td&gt;%s&lt;/td&gt;&lt;/tr&gt;&#8221; % (name,value)<br />
stats += &#8220;&lt;/table&gt;&#8221;<br />
sendmail_location = &#8220;/usr/sbin/sendmail&#8221; # sendmail location<br />
p = os.popen(&#8220;%s -t&#8221; % &#8220;/usr/sbin/sendmail&#8221;, &#8220;w&#8221;)<br />
p.write(&#8220;From: %s\n&#8221; % &#8220;error-reporter@domain.com&#8221;)<br />
p.write(&#8220;To: %s\n&#8221; % &#8220;mail@domain.com&#8221;)<br />
p.write(&#8220;Content-Type: text/html\n&#8221;)<br />
p.write(&#8220;Subject: Error %s in accessing \n&#8221; % os.environ["REDIRECT_STATUS"])<br />
p.write(&#8220;\n&#8221;) # blank line separating headers from body<br />
p.write(stats)<br />
status = p.close()<br />
&#8221;&#8217;print &#8220;&lt;H3&gt;&lt;center&gt;Inconvenience Regretted.  Team has been notified of this issue&lt;/center&gt;&lt;/h3&gt;&#8221;&#8221;&#8217;<br />
cookieclearjs=&#8221;"&#8221;<br />
&lt;script language=&#8217;JavaScript&#8217;&gt;<br />
var todate = new Date ( );<br />
todate.setTime ( todate.getTime() &#8211; 100000 );<br />
var domain_url_del = window.location.href;<br />
var domain_Name_url_del = domain_url_del.split(&#8220;http://&#8221;);<br />
var domain_Name_temp_del = domain_Name_url_del[1].split(&#8220;/&#8221;);<br />
var domain_Name_del = domain_Name_temp_del[0];<br />
var cookieList = document.cookie.split(&#8216;;&#8217;);<br />
for(var i=0;i &lt; cookieList.length;i++)<br />
{<br />
var name = cookieList[i];<br />
if(name.indexOf(&#8220;MyLinks&#8221;)!=-1)<br />
{<br />
document.cookie = &#8221;+name+&#8217;=; path=//APPLICATION/PATH; domain=.&#8217; + domain_Name_del + &#8216;; expires=&#8217; + todate.toGMTString();<br />
document.cookie = &#8221;+name+&#8217;=; path=//APPLICATION/PATH; domain=.&#8217; + domain_Name_del + &#8216;; expires=&#8217; + todate.toGMTString();<br />
}<br />
}<br />
&lt;/script&gt;<br />
&#8220;&#8221;"<br />
print cookieclearjs<br />
print &#8220;&lt;script language=&#8217;JavaScript&#8217;&gt;window.location=&#8217;%s&#8217;&lt;/script&gt;&#8221; % os.environ["REDIRECT_SCRIPT_URI"]<br />
else:<br />
print &#8220;&lt;H3&gt;&lt;center&gt;What you are looking for, is not here&lt;/center&gt;&lt;/h3&gt;&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadminupdates.com/blog/2010/06/24/how-to-catch-500-error-from-error-logs-in-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Apache 2.2.11 with Weblogic 10.3 on Ubuntu 9.04 64 bit</title>
		<link>http://sysadminupdates.com/blog/2010/03/15/installing-apache-2-2-11-with-weblogic-10-3-on-ubuntu-9-04-64-bit/</link>
		<comments>http://sysadminupdates.com/blog/2010/03/15/installing-apache-2-2-11-with-weblogic-10-3-on-ubuntu-9-04-64-bit/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 16:51:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tomcat / jboss application server]]></category>
		<category><![CDATA[linux unix issues and fixes]]></category>

		<guid isPermaLink="false">http://sysadminupdates.com/blog/2010/03/15/installing-apache-2-2-11-with-weblogic-10-3-on-ubuntu-9-04-64-bit/</guid>
		<description><![CDATA[This post takes you through the steps to install Apache 2.2.11 on  Ubuntu 9.04 64 bit and make it work with Weblogic 10.3. The post walks  through the steps that I followed, the problems that I faced and the  solutions ( er..hacks) to get them resolved.
Installing Apache

Is simple do

sudo apt-get install apache2
If [...]]]></description>
			<content:encoded><![CDATA[<p>This post takes you through the steps to install Apache 2.2.11 on  Ubuntu 9.04 64 bit and make it work with Weblogic 10.3. The post walks  through the steps that I followed, the problems that I faced and the  solutions ( er..hacks) to get them resolved.</p>
<p><strong>Installing Apache</strong></p>
<ul>
<li>Is simple do</li>
</ul>
<blockquote><p>sudo apt-get install apache2</p></blockquote>
<p>If you want to build it from sources then follow these steps.</p>
<ul>
<li>Once you have installed apache2 then the installation happens at the  following locations in Ubuntu</li>
</ul>
<blockquote><p>Apache config files are in /etc/apache<br />
Apache log files are in /var/log/apache<br />
Apache libs are in /usr/lib/apache<br />
Other files can be in /usr/share/apache, /var/lib/apache<br />
executables in /usr/sbin apache and apache2ctl</p></blockquote>
<ul>
<li>Now to start apache execute the following</li>
</ul>
<blockquote><p>vhazrati@vhazrati-laptop:/usr/sbin$ sudo apache2ctl start</p></blockquote>
<ul>
<li>Note that the server is started as a root, else you might get the  following error</li>
</ul>
<blockquote><p>(13)Permission denied: make_sock: could not bind to  address 0.0.0.0:80<br />
no listening sockets available, shutting down<br />
Unable to open logs</p></blockquote>
<p>You should be able to access the default page on http://localhost now  and see <strong>It Works!</strong></p>
<p><strong>Now, Integrating  with Weblogic</strong></p>
<p><strong><br />
</strong></p>
<ul>
<li>Download the apache plugins for weblogic 10.3 from the following  location</li>
</ul>
<blockquote><p><a href="http://download.oracle.com/otn/bea/weblogic/server103/server103_apacheplugins.zip" target="_blank">http://download.oracle.com/otn/bea/weblogic/server103/server103_apacheplugins.zip</a></p></blockquote>
<ul>
<li>Unzip the contents and select the <strong>mod_wl_22.so</strong> file  from the location</li>
</ul>
<blockquote><p>&lt;apache-plugin-unzip-location&gt;linux/x86_64</p></blockquote>
<ul>
<li>This file needs to be loaded the following location</li>
</ul>
<blockquote><p>/usr/lib/apache2/modules</p></blockquote>
<ul>
<li>to test whether the file is valid or not do <strong>ldd</strong></li>
</ul>
<blockquote><p>vhazrati@vhazrati-laptop:/usr/lib/apache2/modules$ ldd  mod_wl_22.so<br />
linux-vdso.so.1 =&gt;  (0×00007fff02ffe000)<br />
libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0×00007f5cfaaff000)<br />
libm.so.6 =&gt; /lib/libm.so.6 (0×00007f5cfa87a000)<br />
libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0×00007f5cfa661000)<br />
libc.so.6 =&gt; /lib/libc.so.6 (0×00007f5cfa2ef000)<br />
/lib64/ld-linux-x86-64.so.2 (0×00007f5cfafc5000)</p></blockquote>
<ul>
<li>You might notice that some file like in my case <strong>libstdc++.so.5  =&gt; was not found!</strong></li>
</ul>
<blockquote><p>-bash-3.00$ ldd mod_wl_22.so<br />
<strong>libstdc++.so.5 =&gt; not found</strong><br />
libm.so.6 =&gt; /lib64/tls/libm.so.6 (0×0000002a9572f000)<br />
libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0×0000002a958b5000)<br />
libc.so.6 =&gt; /lib64/tls/libc.so.6 (0×0000002a959c3000)<br />
/lib64/ld-linux-x86-64.so.2 (0×000000552aaaa000)</p></blockquote>
<ul>
<li>Goto the synaptic package manager, search and install this file.</li>
</ul>
<ul>
<li>Now create a <strong>weblogic.load</strong> file with the following  contents</li>
</ul>
<blockquote><p>LoadModule weblogic_module  /usr/lib/apache2/modules/mod_wl_22.so</p></blockquote>
<ul>
<li>and put it at the following location</li>
</ul>
<blockquote><p>/etc/apache2/mods-enabled</p></blockquote>
<ul>
<li>You can also create a <strong>weblogic.conf file </strong>with the  following contents at the same location</li>
</ul>
<blockquote><p>&lt;Location /medrec&gt;<br />
SetHandler weblogic-handler<br />
WebLogicHost 127.0.1.1<br />
WebLogicPort 7011<br />
&lt;/Location&gt;</p></blockquote>
<p>This would help in redirecting a request like http://localhost/medrec  to the weblogic server running on 127.0.1.1 and at 7011 port with the  application name medrec.</p>
<ul>
<li>Restart Apache</li>
</ul>
<blockquote><p>vhazrati@vhazrati-laptop:/usr/sbin$ sudo apache2ctl  restart</p></blockquote>
<ul>
<li>Check whether the weblogic_module has been loaded successfully or  not</li>
</ul>
<blockquote><p>vhazrati@vhazrati-laptop:/usr/sbin$ apache2 -t -D  DUMP_MODULES<br />
apache2: Could not reliably determine the server’s fully qualified  domain name, using 127.0.1.1 for ServerName<br />
Loaded Modules:<br />
core_module (static)<br />
log_config_module (static)<br />
logio_module (static)<br />
mpm_worker_module (static)<br />
http_module (static)<br />
so_module (static)<br />
alias_module (shared)<br />
auth_basic_module (shared)<br />
authn_file_module (shared)<br />
authz_default_module (shared)<br />
authz_groupfile_module (shared)<br />
authz_host_module (shared)<br />
authz_user_module (shared)<br />
autoindex_module (shared)<br />
cgid_module (shared)<br />
deflate_module (shared)<br />
dir_module (shared)<br />
env_module (shared)<br />
mime_module (shared)<br />
negotiation_module (shared)<br />
setenvif_module (shared)<br />
status_module (shared)<br />
<strong> weblogic_module (shared)</strong></p></blockquote>
<ul>
<li>If you see the weblogic_module loaded fine then you have configured  it correctly and can now access the application at</li>
</ul>
<blockquote><p>http://localhost/medrec/</p></blockquote>
<ul>
<li>To t<strong>est whether the apache2.conf file is correct or not</strong> you can use</li>
</ul>
<blockquote><p>vhazrati@vhazrati-laptop:/usr/sbin$ apache2 -t<br />
apache2: Could not reliably determine the server’s fully qualified  domain name, using 127.0.1.1 for ServerName<br />
Syntax OK</p></blockquote>
<p><strong>Other Potential  Problem(s)</strong></p>
<ul>
<li>You may encounter the problem <strong>bad user name  ${APACHE_RUN_USER}</strong></li>
</ul>
<p>this is because the value of ${APACHE_RUN_USER} is not getting picked  up. Ideally it should be picked up from <strong>/etc/apache2/envvars</strong></p>
<p>which has the following entries</p>
<blockquote><p># envvars – default environment variables for apache2ctl</p>
<p># Since there is no sane way to get the parsed apache2 config in  scripts, some<br />
# settings are defined via environment variables and then used in  apache2ctl,<br />
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.<br />
export APACHE_RUN_USER=www-data<br />
export APACHE_RUN_GROUP=www-data<br />
export APACHE_PID_FILE=/var/run/apache2.pid</p></blockquote>
<p>However, still in your case if these values are not picked up then  goto the /etc/apache2/apache2.conf file and make the following changes</p>
<blockquote><p># These need to be set in /etc/apache2/envvars<br />
# User ${APACHE_RUN_USER}<br />
# Group ${APACHE_RUN_GROUP}<br />
User www-data<br />
Group www-data</p></blockquote>
<ul>
<li>The weblogic.load file is not read for some reason and hence the  weblogic_module is not loaded</li>
</ul>
<p>Make an entry in the <strong>httpd.conf file</strong> at the  following location</p>
<blockquote><p>/etc/apache2/httpd.conf</p></blockquote>
<p>and enter the LoadModule and other configuration data in this file</p>
<blockquote><p>LoadModule weblogic_module  /usr/lib/apache2/modules/mod_wl_22.so</p>
<p>&lt;Location /medrec&gt;<br />
SetHandler weblogic-handler<br />
WebLogicHost 127.0.1.1<br />
WebLogicPort 7011<br />
&lt;/Location&gt;</p></blockquote>
<p>There is an entry in the apache2.conf file to include the httpd.conf  file, hence the changes of httpd.conf would get loaded</p>
<blockquote><p># Include all the user configurations:<br />
Include /etc/apache2/httpd.conf</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://sysadminupdates.com/blog/2010/03/15/installing-apache-2-2-11-with-weblogic-10-3-on-ubuntu-9-04-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to check the installed mod_jk version</title>
		<link>http://sysadminupdates.com/blog/2010/03/04/go-back-linuxquestions-org-forums-linux-linux-newbie-reload-this-page-how-to-check-the-installed-mod_jk-version/</link>
		<comments>http://sysadminupdates.com/blog/2010/03/04/go-back-linuxquestions-org-forums-linux-linux-newbie-reload-this-page-how-to-check-the-installed-mod_jk-version/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 09:35:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux Operating System]]></category>
		<category><![CDATA[Tomcat / jboss application server]]></category>
		<category><![CDATA[Web server]]></category>

		<guid isPermaLink="false">http://sysadminupdates.com/blog/?p=21</guid>
		<description><![CDATA[If you have that already installed then if you have enable mod_jk log then you can check from that log file or you can do
http://Your_SERVER/ApplicationURL/SomeFOLDER/@#@#CS&#60;&#62;&#62;$#$#$%
You will get internal serever error over there at the bottom you will get the mod_jk version with apache version.
e.g.
Apache/2.0.59 (Unix) mod_jk/1.2.28
]]></description>
			<content:encoded><![CDATA[<p>If you have that already installed then if you have enable mod_jk log then you can check from that log file or you can do</p>
<p>http://Your_SERVER/ApplicationURL/SomeFOLDER/@#@#CS&lt;&gt;&gt;$#$#$%</p>
<p>You will get internal serever error over there at the bottom you will get the mod_jk version with apache version.</p>
<p>e.g.</p>
<p>Apache/2.0.59 (Unix) mod_jk/1.2.28</p>
]]></content:encoded>
			<wfw:commentRss>http://sysadminupdates.com/blog/2010/03/04/go-back-linuxquestions-org-forums-linux-linux-newbie-reload-this-page-how-to-check-the-installed-mod_jk-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
