<?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>Making Life Simple &#187; apache</title>
	<atom:link href="http://www.lalitmehta.com/home/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lalitmehta.com/home</link>
	<description></description>
	<lastBuildDate>Tue, 09 Feb 2010 21:36:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Integrate Apache 2 with Tomcat 6</title>
		<link>http://www.lalitmehta.com/home/2010/01/18/integrate-apache-2-with-tomcat-6/</link>
		<comments>http://www.lalitmehta.com/home/2010/01/18/integrate-apache-2-with-tomcat-6/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 20:08:18 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[general web]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/?p=131</guid>
		<description><![CDATA[I have been trying to configure apache/tomcat is such a way that apache comes on the front-end so that I can have all the features of apache like URL rewriting, virtual hosts, PHP etc. and forward only certain requests to tomcat whose only job should be running servlets. I have CentOS installed on my server [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying to configure apache/tomcat is such a way that apache comes on the front-end so that I can have all the features of apache like URL rewriting, virtual hosts, PHP etc. and forward only certain requests to tomcat whose only job should be running servlets.</p>
<p>I have CentOS installed on my server with Apache 2 installed through yum and the goal was to install the binaries for Tomcat 6 and make them talk to each other.  After some googling, the best tutorial I found to configure tomcat through mod_jk was found <a href="http://www3.ntu.edu.sg/home/ehchua/programming/howto/Apache_Tomcat_HowTo.html" target="_blank">here</a>.  I have attached the PDF of the instructions <a title="Integrate Apache2 with Tomcat 6" href="http://www.lalitmehta.com/home/wp-content/uploads/2010/01/Apache2-Tomcat6.pdf" target="_blank">here</a>.<br />
After following the steps, I was easily able to create a worker and configure apache to forward the request to /examples to tomcat.<br />
The next issue was how to configure virtual hosts so that I can host multiple websites, some handled by apache and others through tomcat. Following is the snippet of httpd.conf setting that needs to be updated to enable virtual hosting.</p>
<p><code><br />
NameVirtualHost *:80<br />
#<br />
# NOTE: NameVirtualHost cannot be used without a port specifier<br />
# (e.g. :80) if mod_ssl is being used, due to the nature of the<br />
# SSL protocol.<br />
#<br />
#<br />
# VirtualHost example:<br />
# Almost any Apache directive may go into a VirtualHost container.<br />
# The first VirtualHost section is used for requests without a known<br />
# server name.<br />
#<br />
#&lt;VirtualHost *:80&gt;<br />
#    ServerAdmin webmaster@dummy-host.example.com<br />
#    DocumentRoot /www/docs/dummy-host.example.com<br />
#    ServerName dummy-host.example.com<br />
#    ErrorLog logs/dummy-host.example.com-error_log<br />
#    CustomLog logs/dummy-host.example.com-access_log common<br />
#&lt;/VirtualHost&gt;<br />
&lt;VirtualHost *:80&gt;</code><code><br />
ServerAdmin webmaster@lalitmehta.com<br />
ServerName www.lalitmehta.com<br />
ErrorLog logs/lalitmehta.com-error_log<br />
CustomLog logs/lalitmehta-access_log common<br />
&lt;/VirtualHost&gt;<br />
&lt;VirtualHost *:80&gt;<br />
ServerAdmin info@saiyam.com<br />
ServerName rsspile.com<br />
#   No need of DocumentRoot<br />
ErrorLog logs/rsspile.com-error_log<br />
CustomLog logs/rsspile.com-access_log common<br />
JkMount /rss ajp13<br />
JkMount /rss/* ajp13<br />
&lt;/VirtualHost&gt;<br />
</code><br />
<br />
I do have two questions though:<br />
1. since mod_jk.so is available for download for Linux, what advantage you get by compiling Apache and mod_jk from source? Most of the websites mention the need to compile the source. Let me know <img src='http://www.lalitmehta.com/home/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
2. How do I enable SSL on my server with the above configuration?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2010/01/18/integrate-apache-2-with-tomcat-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create self signing SSL Certificate</title>
		<link>http://www.lalitmehta.com/home/2009/07/10/create-self-signing-ssl-certificate/</link>
		<comments>http://www.lalitmehta.com/home/2009/07/10/create-self-signing-ssl-certificate/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 17:10:58 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/?p=93</guid>
		<description><![CDATA[Generate server key openssl genrsa -des3 -out server.key 4096 Create certificate signing request openssl req -new -key server.key -out server.csr Sign the certificate signing request with the server key openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt Make the server key that does not need the password openssl rsa -in server.key -out [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Generate server key<br />
<code>openssl genrsa -des3 -out server.key 4096</code></li>
<li>Create certificate signing request<br />
<code>openssl req -new -key server.key -out server.csr</code></li>
<li>Sign the certificate signing request with the server key<br />
<code>openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt</code></li>
<li>Make the server key that does not need the password<br />
<code>openssl rsa -in server.key -out server.key.insecure</code></li>
<li>Do some house cleaning<br />
<code>mv server.key server.key.secure<br />
mv server.key.insecure server.key</code></li>
<li>Use the following files in apache configuration<br />
<code>server.key<br />
server.crt</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2009/07/10/create-self-signing-ssl-certificate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force SSL on apache</title>
		<link>http://www.lalitmehta.com/home/2009/07/10/force-ssl-on-apache/</link>
		<comments>http://www.lalitmehta.com/home/2009/07/10/force-ssl-on-apache/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 15:17:53 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/?p=89</guid>
		<description><![CDATA[mod rewrite should be enabled on apache. Add the following to your apache config file. ######################################### #### XXX: BEGIN EDIT FOR MOD_REWRITE #### #### This is intended to force HTTPS #### #### for all inbound HTTP requests #### #### # This module (mod_rewrite) simply tells Apache2 that all connections to # port 80 need to [...]]]></description>
			<content:encoded><![CDATA[<p>mod rewrite should be enabled on apache. Add the following to your apache config file.<br />
<code><br />
#########################################<br />
#### XXX: BEGIN EDIT FOR MOD_REWRITE ####<br />
#### This is intended to force HTTPS ####<br />
#### for all inbound HTTP requests ####</p>
<p>####<br />
# This module (mod_rewrite) simply tells Apache2 that all connections to<br />
# port 80 need to go to port 443 – SSL – No exceptions<br />
####</p>
<p><IfModule !mod_rewrite.c><br />
LoadModule rewrite_module modules/mod_rewrite.so<br />
</IfModule><br />
<IfModule mod_rewrite.c><br />
RewriteEngine on</p>
<p>####<br />
# The line below sets the rewrite condition for mod_rewrite.so.<br />
# That is, if the server port does not equal 443, then this condition is true<br />
####</p>
<p>ReWriteCond %{SERVER_PORT} !^443$</p>
<p>####<br />
# The line below is the rule, it states that if above condition is true,<br />
# and the request can be any url, then redirect everything to https:// plus<br />
# the original url that was requested.<br />
####</p>
<p>RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]<br />
</IfModule></p>
<p>#### XXX: END EDIT FOR MOD_REWRITE ####<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2009/07/10/force-ssl-on-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable register_global through .htaccess</title>
		<link>http://www.lalitmehta.com/home/2008/06/17/enable-register_global-through-htaccess/</link>
		<comments>http://www.lalitmehta.com/home/2008/06/17/enable-register_global-through-htaccess/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 04:36:10 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/2008/06/17/enable-register_global-through-htaccess/</guid>
		<description><![CDATA[I would not recommend to enable register_globals, but if you need to enable the register_globals for a particular web folder, you can edit the .htaccess file and append the following to it php_flag register_globals on Restart apache and you are on your way.]]></description>
			<content:encoded><![CDATA[<p>I would not recommend to enable register_globals, but if you need to enable the register_globals for a particular web folder, you can edit the .htaccess file and append the following to it</p>
<p><code>php_flag register_globals on</code></p>
<p>Restart apache and you are on your way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2008/06/17/enable-register_global-through-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mounted cifs folder does not display images</title>
		<link>http://www.lalitmehta.com/home/2008/06/17/mounted-cifs-folder-does-not-display-images/</link>
		<comments>http://www.lalitmehta.com/home/2008/06/17/mounted-cifs-folder-does-not-display-images/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 04:09:43 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/2008/06/17/mounted-cifs-folder-does-not-display-images/</guid>
		<description><![CDATA[To host a test website, I had mounted a folder on my Linux server from my Vista machine.  When I opened the browser and went to the website, I was unable to view the images.  The website worked fine except the images were not showing up.  Upon a little research it turned out that I [...]]]></description>
			<content:encoded><![CDATA[<p>To host a test website, I had mounted a folder on my Linux server from my Vista machine.  When I opened the browser and went to the website, I was unable to view the images.  The website worked fine except the images were not showing up.  Upon a little research it turned out that I had to disable the &#8220;EnableSendfile&#8221; in my httpd.conf file.</p>
<p><code>&lt;Directory "/path-to-nfs-files"&gt;<br />
EnableSendfile Off<br />
&lt;/Directory&gt;</code></p>
<p>For more information, click <a href="http://httpd.apache.org/docs/2.0/mod/core.html#EnableSendfile" title="EnableSendfile" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2008/06/17/mounted-cifs-folder-does-not-display-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
