<?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>mikwat code &#187; apache</title>
	<atom:link href="http://code.mikwat.com/archives/category/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://code.mikwat.com</link>
	<description>A coder's daily explorations through PHP, Java, CSS, JavaScript, Linux, OS X, Apache, Tomcat, and everything else.</description>
	<lastBuildDate>Wed, 20 Feb 2008 22:14:01 +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>SSL + gzip Compression with Apache and Tomcat</title>
		<link>http://code.mikwat.com/archives/21</link>
		<comments>http://code.mikwat.com/archives/21#comments</comments>
		<pubDate>Mon, 27 Aug 2007 16:28:25 +0000</pubDate>
		<dc:creator>mikwat</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://code.mikwat.com/archives/21</guid>
		<description><![CDATA[My setup is a single Fedora Core 6 server running Apache 2.2.4 (with mod_ssl and mod_proxy) and Tomcat 5.
With mod_ssl the following virtualhost is setup using an SSL certificate from GoDaddy.  Notice the SSLCertificateChainFile /etc/httpd/conf/ssl.crt/gd_intermediate_bundle.crt reference.  This intermediate certificate comes from GoDaddy and is required.  I didn&#8217;t catch this at first and [...]]]></description>
			<content:encoded><![CDATA[<p>My setup is a single Fedora Core 6 server running <a href="/archives/category/apache">Apache</a> 2.2.4 (with mod_ssl and mod_proxy) and <a href="/archives/category/tomcat">Tomcat</a> 5.</p>
<p>With <strong>mod_ssl</strong> the following virtualhost is setup using an SSL certificate from GoDaddy.  Notice the <strong>SSLCertificateChainFile /etc/httpd/conf/ssl.crt/gd_intermediate_bundle.crt</strong> reference.  This intermediate certificate comes from GoDaddy and is required.  I didn&#8217;t catch this at first and couldn&#8217;t understand what my web browser was unhappy about.  When I called GoDaddy support they told me my certificate was setup correctly and worked in all of there &#8220;off-site&#8221; test browsers.  They were no help, so I continued to dig around and finally found the answer.</p>
<p>The <strong>mod_proxy</strong> lines pass all requests to the <a href="/archives/category/tomcat">Tomcat</a> instance listening on port 9014.</p>
<p><b>/etc/httpd/conf.d/ssl.conf</b></p>
<pre>
&lt;virtualhost&gt;
DocumentRoot  /var/www/html/
ServerName    myserver.com:433</virtualhost>  SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/myserver.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/myserver.key
SSLCertificateChainFile /etc/httpd/conf/ssl.crt/gd_intermediate_bundle.crt
SetEnvIf User-Agent ".*MSIE.*"
         nokeepalive ssl-unclean-shutdown
         downgrade-1.0 force-response-1.0
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
CustomLog logs/ssl_request_log
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

ProxyPreserveHost On
ProxyPass / http://localhost:9014/
ProxyPassReverse / http://localhost:9014/
SetEnv proxy-nokeepalive 1
&lt;/virtualserver&gt;
</pre>
<p>For the <a href="/archives/category/tomcat">Tomcat</a> setup, a proxy connector is configured to listen on port 9014 and to proxy port 443 requests (SSL).  The communication between <a href="/archives/category/apache">Apache</a> and <a href="/archives/category/tomcat">Tomcat</a> is not secure, but this is not a concern since this communication is local to the server.  Finally, compression is turned on for several common mime-types.</p>
<p><b>server.xml</b></p>
<pre>
  ...
  &lt;Connector acceptCount="100" connectionTimeout="60000" disableUploadTimeout="true" port="9014" redirectPort="8944"
  scheme="https" proxyPort="443" compression="on" compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript"/&gt;
  ...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://code.mikwat.com/archives/21/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems using Digester in custom Struts Plugin</title>
		<link>http://code.mikwat.com/archives/18</link>
		<comments>http://code.mikwat.com/archives/18#comments</comments>
		<pubDate>Tue, 24 Jul 2007 21:49:22 +0000</pubDate>
		<dc:creator>mikwat</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://code.mikwat.com/archives/18</guid>
		<description><![CDATA[In migrating from Tomcat 5.0 to Tomcat 5.5, one of my custom Struts plugins started failing on startup with the following exception:

org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: com.mikwat.struts.config.AuthorizationActionConfig
The root of the problems appears to be that the Digester defaults to using the same ClassLoader that loaded it and whichever ClassLoader this is, it doesn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>In migrating from <a href="/archives/category/tomcat">Tomcat</a> 5.0 to <a href="/archives/category/tomcat">Tomcat </a>5.5, one of my custom Struts plugins started failing on startup with the following exception:</p>
<pre>
org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: com.mikwat.struts.config.AuthorizationActionConfig</pre>
<p>The root of the problems appears to be that the Digester defaults to using the same ClassLoader that loaded it and whichever ClassLoader this is, it doesn&#8217;t have access to my webapp class <code>com.mikwat.struts.config.AuthorizationActionConfig</code>.</p>
<p>After Googling around, I eventually came across this post regarding a similar problem loading the Quartz plugin: <a href="http://mail-archives.apache.org/mod_mbox/struts-user/200305.mbox/%3CB40B3D4758FBFD4AA8C4F3A015DE4446011DF774@sTamExchange1.paymentech.us%3E" onclick="pageTracker._trackPageview('/outgoing/mail-archives.apache.org/mod_mbox/struts-user/200305.mbox/_3CB40B3D4758FBFD4AA8C4F3A015DE4446011DF774_sTamExchange1.paymentech.us_3E?referer=');">Mailing list archives</a>.</p>
<p>The solution is to call setUseContextClassLoader(true) on the Digester object which forces it to use the ClassLoader found by calling <code>Thread.currentThread().getContextClassLoader()</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.mikwat.com/archives/18/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Monitoring</title>
		<link>http://code.mikwat.com/archives/7</link>
		<comments>http://code.mikwat.com/archives/7#comments</comments>
		<pubDate>Sun, 01 Apr 2007 21:20:41 +0000</pubDate>
		<dc:creator>mikwat</dc:creator>
				<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://code.mikwat.com/archives/7</guid>
		<description><![CDATA[After having some site performance and availability problems, I began investigating ways to monitor web servers. There are lots of sites offering various services, here&#8217;s what I&#8217;ve settled on.
1. Broadband Reports offers both free and paid services.  Their Line Monitoring tool provides a continuous response time graph shown below by sending out pings every [...]]]></description>
			<content:encoded><![CDATA[<p>After having some site performance and availability problems, I began investigating ways to monitor web servers. There are lots of sites offering various services, here&#8217;s what I&#8217;ve settled on.</p>
<p>1. <a href="http://www.dslreports.com" onclick="pageTracker._trackPageview('/outgoing/www.dslreports.com?referer=');">Broadband Reports</a> offers both free and paid services.  Their <strong>Line Monitoring</strong> tool provides a continuous response time graph shown below by sending out pings every 10 minutes.  The Line Monitoring tool costs approximately $1 per week.  It also provide the ability to setup a HTTP ping to a specific URL.</p>
<p><img src="http://code.mikwat.com/wp-content/uploads/2007/04/line-monitor-ping1.gif" alt="Line Monitor - Ping" /></p>
<p><img src="http://code.mikwat.com/wp-content/uploads/2007/04/line-monitor-http-ping.gif" alt="Line Monitor - HTTP Ping" /></p>
<p>2. <a href="http://mon.itor.us/" onclick="pageTracker._trackPageview('/outgoing/mon.itor.us/?referer=');">mon.itor.us</a> is a free web site monitor tool.  As far as simplicity in setup, mon.itor.us couldn&#8217;t be easier.  Their website serves as a dashboard with drag-and-drop modules for each of your sites.  These modules can also be included in your OS X dashboard, Google Personal, Netvibes, etc.  Another nice feature is the ability to be notified when your sites are unavailable.  Alerts can be sent to an email address, IM account, or cellphone.  The main problem with mon.itor.us is in its ping frequency, which is currently between 30-45 minutes.  According to their parent site <a href="http://www.monitis.com/" onclick="pageTracker._trackPageview('/outgoing/www.monitis.com/?referer=');">Monitis</a> they are rolling out a Bronze plan ($10 per month) that will ping every 5 minutes and provide some advanced features.</p>
<p><img src="http://code.mikwat.com/wp-content/uploads/2007/04/mon-itor-us.gif" alt="Mon.itor.us - Ping" /></p>
]]></content:encoded>
			<wfw:commentRss>http://code.mikwat.com/archives/7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Tomcat Proxy Connector</title>
		<link>http://code.mikwat.com/archives/3</link>
		<comments>http://code.mikwat.com/archives/3#comments</comments>
		<pubDate>Sun, 01 Apr 2007 17:22:24 +0000</pubDate>
		<dc:creator>mikwat</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://code.mikwat.com/?p=3</guid>
		<description><![CDATA[I ran into some trouble configuring Apache/Tomcat on Fedora Core 6 using the Proxy AJP Module this week.  Here are my final settings and a brief description of the problem and solution.
/etc/httpd/conf.d/proxy_ajp.conf :

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
ProxyPass / http://localhost:9013/

server.xml :

&#60;Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="9013" redirectPort="8943" proxyName="www.myhost.com" proxyPort="80"/&#62;

After settings things up, nothing worked.  I found the [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into some trouble configuring <a href="/archives/category/apache">Apache</a>/<a href="/archives/category/tomcat">Tomcat</a> on Fedora Core 6 using the Proxy AJP Module this week.  Here are my final settings and a brief description of the problem and solution.</p>
<p>/etc/httpd/conf.d/proxy_ajp.conf :<br />
<code><br />
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so<br />
ProxyPass / http://localhost:9013/<br />
</code></p>
<p>server.xml :<br />
<code><br />
&lt;Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="9013" redirectPort="8943" proxyName="www.myhost.com" proxyPort="80"/&gt;<br />
</code></p>
<p>After settings things up, nothing worked.  I found the following error in the Apache logfile:<br />
<code><br />
[Fri Mar 30 02:23:34 2007] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:9013 (localhost) failed<br />
[Fri Mar 30 02:23:34 2007] [error] ap_proxy_connect_backend disabling worker for (localhost)<br />
</code></p>
<p>After digging around <a href="/archives/category/google">Google</a> a bit, I finally found the following solution:</p>
<p><a href="http://uppertank.net/blog/?m=200512" onclick="pageTracker._trackPageview('/outgoing/uppertank.net/blog/?m=200512&amp;referer=');">http://uppertank.net/blog/?m=200512</a></p>
<p><code><br />
[root@clue conf]# getsebool -a<br />
allow_execmem –&gt; active<br />
allow_execmod –&gt; active<br />
allow_execstack –&gt; active<br />
allow_kerberos –&gt; inactive<br />
allow_ypbind –&gt; inactive<br />
dhcpd_disable_trans –&gt; inactive<br />
httpd_builtin_scripting –&gt; active<br />
httpd_can_network_connect –&gt; inactive<br />
httpd_disable_trans –&gt; inactive<br />
httpd_enable_cgi –&gt; active<br />
httpd_enable_homedirs –&gt; active<br />
httpd_ssi_exec –&gt; active<br />
httpd_tty_comm –&gt; inactive<br />
httpd_unified –&gt; active<br />
mysqld_disable_trans –&gt; inactive<br />
named_disable_trans –&gt; inactive<br />
named_write_master_zones –&gt; inactive<br />
nscd_disable_trans –&gt; inactive<br />
ntpd_disable_trans –&gt; inactive<br />
portmap_disable_trans –&gt; inactive<br />
postgresql_disable_trans –&gt; inactive<br />
read_default_t –&gt; active<br />
snmpd_disable_trans –&gt; inactive<br />
squid_connect_any –&gt; inactive<br />
squid_disable_trans –&gt; inactive<br />
syslogd_disable_trans –&gt; inactive<br />
use_nfs_home_dirs –&gt; inactive<br />
use_samba_home_dirs –&gt; inactive<br />
winbind_disable_trans –&gt; inactive<br />
ypbind_disable_trans –&gt; inactive<br />
[root@clue conf]# setsebool httpd_can_network_connect true<br />
[root@clue conf]# getsebool httpd_can_network_connect<br />
httpd_can_network_connect –&gt; active<br />
[root@clue conf]#<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://code.mikwat.com/archives/3/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
