<?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; openssl</title>
	<atom:link href="http://techiezone.rottigni.net/category/openssl/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>How to check if LDAPS is really running on a server?</title>
		<link>http://techiezone.rottigni.net/2009/02/how-to-check-if-ldaps-is-really-running-on-a-server/</link>
		<comments>http://techiezone.rottigni.net/2009/02/how-to-check-if-ldaps-is-really-running-on-a-server/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 16:06:58 +0000</pubDate>
		<dc:creator>RoarinPenguin</dc:creator>
				<category><![CDATA[openssl]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[ldaps]]></category>
		<category><![CDATA[verify]]></category>

		<guid isPermaLink="false">http://techiezone.rottigni.net/2009/02/how-to-check-if-ldaps-is-really-running-on-a-server/</guid>
		<description><![CDATA[Sometimes this is necessary since the server “appears” to be running (netstat -an&#124;grep 636 returns port in LISTEN state, but the daemon behind is not operative because (for instance) the certificate has not been installed. If this is the case, grab an openssl client and issue the following command: openssl s_client host &#60;address of the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes this is necessary since the server “appears” to be running (netstat -an|grep 636 returns port in LISTEN state, but the daemon behind is not operative because (for instance) the certificate has not been installed.</p>
<p>If this is the case, grab an openssl client and issue the following command:</p>
<p><strong>openssl s_client host &lt;address of the target host&gt; –port 636</strong> (this is LDAPS standard port)</p>
<p>If server does have valid certificate you should get answer like:</p>
<div class="wlWriterEditableSmartContent" id="scid:8747F07C-CDE8-481f-B0DF-C6CFD074BF67:9b63eff3-7d24-4c28-ab7a-748c6c5e7099" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><a href="http://techiezone.rottigni.net/wp-content/uploads/2009/02/picture18x6.png" title="" rel="thumbnail"><img border="0" src="http://techiezone.rottigni.net/wp-content/uploads/2009/02/picture1.png" /></a></div>
<p>If it does not, you’ll get something like this:</p>
<p><a href="http://techiezone.rottigni.net/wp-content/uploads/2009/02/image.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="309" alt="image" src="http://techiezone.rottigni.net/wp-content/uploads/2009/02/image-thumb.png" width="404" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://techiezone.rottigni.net/2009/02/how-to-check-if-ldaps-is-really-running-on-a-server/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>

