<?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>The RoarinPenguin Techiezone &#187; apache</title>
	<atom:link href="http://techiezone.rottigni.net/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://techiezone.rottigni.net</link>
	<description>Notes, hints, tips... in one word: experience!</description>
	<lastBuildDate>Thu, 26 Jan 2012 03:17:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HowTo add Radius Authentication to Apache2</title>
		<link>http://techiezone.rottigni.net/2011/04/howto-add-radius-authentication-to-apache2/</link>
		<comments>http://techiezone.rottigni.net/2011/04/howto-add-radius-authentication-to-apache2/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 12:48:24 +0000</pubDate>
		<dc:creator>RoarinPenguin</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[mod_radius]]></category>
		<category><![CDATA[Radius]]></category>

		<guid isPermaLink="false">http://techiezone.rottigni.net/?p=174</guid>
		<description><![CDATA[Few notes to myself, to avoid forgetting a cool thing I&#8217;ve just learned. The need is to implement radius based authentication to access a directory on Apache2 Web server. Here&#8217;s how to proceed (instructions have been tested on an Ubuntu 10.10). First, you need to install the needed module for Radius authentication on Apache2, using [...]]]></description>
			<content:encoded><![CDATA[<p>Few notes to myself, to avoid forgetting a cool thing I&#8217;ve just learned.</p>
<p>The need is to implement radius based authentication to access a directory on Apache2 Web server.</p>
<p>Here&#8217;s how to proceed (instructions have been tested on an Ubuntu 10.10).</p>
<p>First, you need to install the needed module for Radius authentication on Apache2, using the command:</p>
<p>apt-get install libapache2-mod-auth-radius</p>
<p>Then, you need to enable it with command:</p>
<p>a2enmod auth_radius</p>
<p>You need now to make your apache web server aware of where to send authentication requests for Radius. There are two ways, depending if you want to make this configuration apache-wide (therefore edit /etc/apache2/http.conf) or if you want to limit it to a specific virtual host (thus you&#8217;ll edit /etc/apache2/sites-enabled/&lt;yoursitename&gt;.conf).</p>
<p>Add the line:</p>
<p>AddRadiusAuth &lt;IP address of the Radius server&gt;:&lt;port where Radius service is listening&gt; &lt;shared secret&gt; [timeout [:retries]]</p>
<p>Assuming you want to protect a specific directory called auth-test, you can insert the following directive in your site/virtualhost configuration file (/etc/apache2/sites-enabled/&lt;yoursitename&gt;.conf):</p>
<p>&lt;Directory &#8220;/var/www/testmyauth&#8221;&gt;<br />
Options Indexes FollowSymlinks<br />
AuthType Basic<br />
AuthName &#8220;Roarin RADIUS Authentication&#8221;<br />
AuthBasicAuthoritative Off<br />
AuthBasicProvider radius<br />
AuthRadiusAuthoritative on<br />
AuthRadiusActive On<br />
Require valid-user<br />
&lt;/Directory&gt;</p>
<p>&nbsp;</p>
<p>Naturally you might add the above directives also in a .htaccess file in the directory you want to protect with Radius based authentication&#8230;</p>
<p>Finally, restart or reload you apache2 using one of the commands:</p>
<p>service apache2 reload</p>
<p>service apache2 restart</p>
<p>Enjoy <img src='http://techiezone.rottigni.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://techiezone.rottigni.net/2011/04/howto-add-radius-authentication-to-apache2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache VirtualHost and Certificates for HTTPS</title>
		<link>http://techiezone.rottigni.net/2008/12/apache-virtualhost-and-certificates-for-https/</link>
		<comments>http://techiezone.rottigni.net/2008/12/apache-virtualhost-and-certificates-for-https/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 22:04:25 +0000</pubDate>
		<dc:creator>RoarinPenguin</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[virtualhost]]></category>

		<guid isPermaLink="false">http://techiezone.rottigni.net/2008/12/apache-virtualhost-and-certificates-for-https/</guid>
		<description><![CDATA[I&#8217;ve finally managed to get this working, so now I need to write some note in case I have to redo it in the future This is short howto about enabling https and multiple virtual hosts on Apache 2.0. Much of the instructions are copypasted from Debian Admin Website where I found great guide I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally managed to get this working, so now I need to write some note in case I have to redo it in the future <img src='http://techiezone.rottigni.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is short howto about enabling https and multiple virtual hosts on Apache 2.0.</p>
<p>Much of the instructions are copypasted from <a title="Debian Admin Website" href="http://www.debianadmin.com/">Debian Admin Website</a> where I found great guide I&#8217;ve successfully followed.</p>
<p>First of all let&#8217;s check that we have all the needed components, or proceed to install them as follows:</p>
<p><strong>Install apache2 in debian etch</strong></p>
<p>#apt-get install apache2</p>
<p>Install openssl using the following command</p>
<p>#apt-get install openssl ssl-cert</p>
<p><strong>Install PHP5 support for apache2 in debian etch</strong></p>
<p>#apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi</p>
<p>Once you install apache server you need to Generate a certificate,Enable Apache SSL support and Configure your SSL options.</p>
<p><strong>Generate A certificate</strong></p>
<p>Generating a certificate will provide to protect the traffic exchanged between clients and your server, however it will be unsigned by a trusted certificate authority so it will generate warnings.</p>
<p>If you want to avoid these warning messages you need to get a trusted certificate from SSL certificate vendors.If you want to Generating an SSL certificate for Apache2 you need to use the openssl. This will ask you questions interactively then generate the certificate file appropriately.</p>
<p><strong>Note:-</strong>For generating certificate you might have used the apache2-ssl-certificate command in debian sarge but in debian etch this command not available.If you want to generate certificates you need to use openssl from you command prompt Use the following command to generate certificates</p>
<p>#openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem</p>
<p>Now you&#8217;ll be prompted to configure the Certificate details. Answers are reflecting MY environment&#8230; yours might be different&#8230;</p>
<p><font color="#0080ff">Generating a 1024 bit RSA private key      <br />&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++++++       <br />&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.++++++       <br />writing new private key to &#8216;/etc/apache2/apache.pem&#8217;       <br />&#8212;&#8211;       <br />You are about to be asked to enter information that will be incorporated       <br />into your certificate request.       <br />What you are about to enter is what is called a Distinguished Name or a DN.       <br />There are quite a few fields but you can leave some blank       <br />For some fields there will be a default value,       <br />If you enter &#8216;.&#8217;, the field will be left blank.       <br />&#8212;&#8211;       <br />Country Name (2 letter code) [AU]:<strong>IT</strong>       <br />State or Province Name (full name) [Some-State]: <strong>Italy</strong>       <br />Locality Name (eg, city) []:<strong>Milan</strong>       <br />Organization Name (eg, company) [Internet Widgits Pty Ltd]:<strong>The RoarinPenguin Inc.</strong>       <br />Organizational Unit Name (eg, section) []: <strong>Certification Department</strong>       <br />Common Name (eg, YOUR name) []: <strong>The RoarinPenguin</strong>       <br />Email Address []:<strong>roarinpenguin@roarinpenguin.com</strong></font></p>
<p>You ahould now have our certificate ready, thus you&#8217;ll proceed in setting the proper permissions:</p>
<p>#chmod 600 /etc/apache2/apache.pem</p>
<p>By default the server will listen for incoming HTTP requests on port 80 &#8211; and not SSL connections on port 443. So you need to enable SSL support by entering the following entry to the file /etc/apache2/ports.conf save and exit the file.</p>
<p>Listen 443</p>
<p><strong>Enable SSL Support</strong></p>
<p>If you want to enable SSL support for your apache web server you need to use the following command:</p>
<p>#a2enmod ssl    <br />Module ssl installed; run /etc/init.d/apache2 force-reload to enable.</p>
<p>Now you need to restart the apache2 server using the following command</p>
<p>#/etc/init.d/apache2 restart</p>
<p><strong>Configuring SSL Certificate to Virtual Hosts in Apache2</strong></p>
<p>First you need to edit the /etc/apache2/sites-available/default file change</p>
<p>NameVirtualHost *    <br />to</p>
<p>NameVirtualHost *:80    <br />NameVirtualHost *:443</p>
<p>Now you need to configure Virtual hosts using port 80</p>
<p>My apache2.conf reads the following at file end:</p>
<p><font color="#0080c0"># Include generic snippets of statements      <br />Include /etc/apache2/conf.d/</font></p>
<p><font color="#0080c0">NameVirtualHost *:80      <br />NameVirtualHost *:443</font></p>
<p><font color="#0080c0"># Include the virtual host configurations:      <br />Include /etc/apache2/sites-enabled/       <br />AddDefaultCharset utf-8       <br />DefaultLanguage it       <br />ServerAdmin </font><a href="mailto:marco@rottigni.net"><font color="#0080c0">marco@rottigni.net</font></a>     <br /><font color="#0080c0">UseCanonicalName off      <br />DocumentRoot /var/www       <br />ServerName webby.rottigni.net       <br /></font></p>
<p><font color="#0080c0"><font color="#000000">And my /etc/apache2/sites-available/default reads:</font></font></p>
<p><font color="#0080c0">&lt;VirtualHost *:80&gt;      <br />DocumentRoot /var/www/       <br />ServerName </font><a href="http://www.rottigni.net"><font color="#0080c0">www.rottigni.net</font></a>     <br /><font color="#0080c0">&lt;Directory &quot;/var/www&quot;&gt;      <br />allow from all       <br />Options +Indexes       <br />&lt;/Directory&gt;       <br />&lt;/VirtualHost&gt;       <br />&lt;VirtualHost *:443&gt;       <br />DocumentRoot /var/www/       <br />ServerName </font><a href="http://www.rottigni.net"><font color="#0080c0">www.rottigni.net</font></a>     <br /><font color="#0080c0">&lt;Directory &quot;/var/www&quot;&gt;      <br />allow from all       <br />Options +Indexes       <br />&lt;/Directory&gt;       <br />&#160;&#160;&#160; SSLEngine on       <br />&#160;&#160;&#160; SSLCertificateFile /etc/apache2/apache.pem       <br />&lt;/VirtualHost&gt;       <br /></font></p>
<p><font color="#0080c0"><font color="#000000">Then I&#8217;ve enabled several websites using command </font></font></p>
<p><font color="#0080c0"><font color="#000000">a2ensite followed by site name you want to enable.</font></font></p>
<p><font color="#0080c0"><font color="#000000">Configuration files for VirtualHosts are stored in </font></font></p>
<p><font color="#0080c0">/etc/apache2/sites-available#</font></p>
<p><font color="#000000">and the configuration for one of my blog reads</font></p>
<p><font size="+0">&lt;VirtualHost *:80&gt;      <br />DocumentRoot /var/www/myblog       <br />&lt;Directory &quot;/var/www/myblog&quot;&gt;       <br />allow from all       <br />Options +Indexes       <br />&lt;/Directory&gt;       <br />ServerName myblog.rottigni.net       <br />&lt;/VirtualHost&gt;       <br />&lt;VirtualHost *:443&gt;       <br />DocumentRoot /var/www/myblog       <br />&lt;Directory &quot;/var/www/myblog&quot;&gt;       <br />allow from all       <br />Options +Indexes       <br />&lt;/Directory&gt;       <br />ServerName myblog.rottigni.net       <br />&#160;&#160;&#160; SSLEngine on       <br />&#160;&#160;&#160; SSLCertificateFile /etc/apache2/apache.pem       <br />&lt;/VirtualHost&gt;       <br /></font><font size="+0"></font></p>
<p><font size="+0"><font color="#000000">That should be everything&#8230; oh, and don&#8217;t forget to reload your Apache config:</font></font></p>
<p><font size="+0"># /etc/init.d/apache2 reload</font></p>
]]></content:encoded>
			<wfw:commentRss>http://techiezone.rottigni.net/2008/12/apache-virtualhost-and-certificates-for-https/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

