<?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>BLOGS@DiGiTSS &#187; Apache</title>
	<atom:link href="http://blogs.digitss.com/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.digitss.com</link>
	<description>DiGiTSS Team&#039;s Programming experience with PHP, MySQL, Ajax, Javascript, jQuery, C# and Microsoft technologies</description>
	<lastBuildDate>Sat, 13 Aug 2011 06:26:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>mod_proxy &amp; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</title>
		<link>http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/</link>
		<comments>http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 10:10:55 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=366</guid>
		<description><![CDATA[mod_proxy and mod_vhost_alias are two very important extensions/modules for Apache web-server. When it comes to hosting multiple websites on same Web-Server using Apache or requirement to run Apache and IIS together then mod_proxy and mod_vhost_alias  are key to succeed.]]></description>
			<content:encoded><![CDATA[<p><strong>mod_proxy</strong> and <strong>mod_vhost_alias</strong> are two very important extensions/modules for <strong>Apache web-server</strong>. When it comes to hosting multiple websites on same Web-Server using Apache or requirement to run Apache and IIS together then <strong>mod_proxy</strong> and <strong>mod_vhost_alias</strong> are key to succeed.</p>
<p>Here is summary of definition for both modules from <strong>Apache docs</strong>.</p>
<blockquote>
<h3><a title="mod_proxy on Apache docs" href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html" target="_blank">mod_proxy</a>:</h3>
<p>This module implements a proxy/gateway for Apache. It implements     proxying capability for <code>FTP</code>, <code>CONNECT</code> (for  SSL),     <code>HTTP/0.9</code>, <code>HTTP/1.0</code>, and <code>HTTP/1.1</code>.     The module can be configured to connect to other proxy modules for  these     and other protocols.</p>
<p>Apache's proxy features are divided into several modules in addition to <code><a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html">mod_proxy</a></code>:     <code><a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy_http.html">mod_proxy_http</a></code>,  <code><a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy_ftp.html">mod_proxy_ftp</a></code> and <code><a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy_connect.html">mod_proxy_connect</a></code>.   Thus, if you want to use     one or more of the particular proxy functions, load     <code><a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html">mod_proxy</a></code> <em>and</em> the appropriate module(s)     into the server (either statically at compile-time or dynamically     via the <code><a href="http://httpd.apache.org/docs/2.0/mod/mod_so.html#loadmodule">LoadModule</a></code> directive).</p>
<p>In addition, extended features are provided by other modules.     Caching is provided by <code><a href="http://httpd.apache.org/docs/2.0/mod/mod_cache.html">mod_cache</a></code> and related     modules.  The ability to contact remote servers using the SSL/TLS     protocol is provided by the <code>SSLProxy*</code> directives of     <code><a href="http://httpd.apache.org/docs/2.0/mod/mod_ssl.html">mod_ssl</a></code>.   These additional modules will need     to be loaded and configured to take advantage of these features.</p>
<h3><a title="mod_vhost_alias on Apache docs" href="http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html" target="_blank">mode_vhost_alias:</a></h3>
<p>This module creates dynamically configured virtual hosts, by     allowing the IP address and/or the <code>Host:</code> header of     the HTTP request to be used as part of the pathname to     determine what files to serve. This allows for easy use of a     huge number of virtual hosts with similar configurations.</p></blockquote>
<h2>How to host multiple domains/sub-domains on a web-server using Apache Virtual-Hosting (mod_vhost_alias)?</h2>
<p><span id="more-366"></span><br />
This is another common requirement where we need to host multiple domains or sub-domains on a single web-server, to do if you are using Apache 2.x then just un-comment following line from <strong>httpd.conf</strong> file if it is commented.</p>
<pre>LoadModule vhost_alias_module modules/mod_vhost_alias.so
</pre>
<p>With Apache 2.x directory structure for go to <strong>/apache/conf/extra/httpd-vhost.conf</strong> and paste following line of code:</p>
<pre>&nbsp;
&nbsp;
&lt;VirtualHost *:80&gt;
    DocumentRoot D:/www/digitss.com
    ServerName digitss.com
    ServerAlias www.digitss.com
    ServerAlias digitss.net
    ErrorLog logs/digitss.com-error.log
    CustomLog logs/digitss.com-access.log common
&nbsp;
    &lt;Directory &quot;D:/www/digitss.com&quot;&gt;
        Options Indexes FollowSymLinks
&nbsp;
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride None
&nbsp;
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
&nbsp;
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;
&nbsp;</pre>
<p>We can specify another web-root for specific virtual-host as well and it can have complete different configuration too. We can also specify as much <strong>ServerAlias</strong> as we want, all of which will point to a single server.</p>
<h2>How to pass request from Apache to ISS or any other web-server running on another port of same/other server?</h2>
<p>This could be a common requirement when we need to have one main domain running with Apache Server serving LAMP web-app and we want some IIS application to host on same server but we don't want user to access them by typing in www.domain.com:88 or something similar we just want it to be accessible via regular port 80. Yes, we would need <strong>mod_vhost_alias</strong> and <strong>mod_proxy</strong> both of them active to make it work. Un-comment following lines from Apache's <strong>httpd.conf</strong> file:</p>
<pre>LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
</pre>
<p>Here is the simple set of line, placing them in <strong>/apache/conf/extra/httpd-vhost.conf </strong>file should do the magic for you:</p>
<pre>&nbsp;
&lt;VirtualHost *:80&gt;
     ProxyPreserveHost On
     ProxyPass / http://127.0.0.1:88/
     ProxyPassReverse / http://127.0.0.1:88/
     ServerName apps.digitss.com
     ErrorLog logs/apps.digitss.com-error.log
     CustomLog logs/apps.digitss.com-access.log common
&lt;/VirtualHost&gt;
&nbsp;
#or 
&nbsp;
&lt;VirtualHost *:80&gt;
     ProxyPreserveHost On
     ProxyPass / http://anotherdomain.com:8008/
     ProxyPassReverse / http://anotherdomain.com:8008/
     ServerName apps.digitss.com
     ErrorLog logs/apps.digitss.com-error.log
     CustomLog logs/apps.digitss.com-access.log common
&lt;/VirtualHost&gt;
&nbsp;</pre>
<p>For above example, apps.digitss.com will point to either local or remote proxy server running on other port and will be transparent to users.</p>
<p><span style="text-decoration: underline;"><strong>References:</strong></span></p>
<p>http://httpd.apache.org/docs/2.0/mod/mod_proxy.html</p>
<p>http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html</p>
<p>Please comment and let me know if mod_proxy or mod_vhost_alias has done some other magic for you.!<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/apache/faster-page-loads-with-apache-mod_deflate-output-filtering/" rel="bookmark" title="August 23, 2009">Faster Page Loads with Apache mod_deflate output filtering</a></li>
<li><a href="http://blogs.digitss.com/apache/installing-apache-on-windows-2008/" rel="bookmark" title="December 6, 2009">Installing Apache on Windows 2008</a></li>
<li><a href="http://blogs.digitss.com/php/beginner%e2%80%99s-resources-for-php-development/" rel="bookmark" title="February 15, 2008">Beginner&#8217;s Resources for PHP-MySQL Development</a></li>
<li><a href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" rel="bookmark" title="April 13, 2008">How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/" rel="bookmark" title="December 6, 2009">Generating 2048-bit CSR with OpenSSL</a></li>
</ul>
<p><!-- Similar Posts took 8.720 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Apache on Windows 2008</title>
		<link>http://blogs.digitss.com/apache/installing-apache-on-windows-2008/</link>
		<comments>http://blogs.digitss.com/apache/installing-apache-on-windows-2008/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 14:36:32 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=322</guid>
		<description><![CDATA[It's not a easy drive when you are installing deploying your open-source application on Microsoft Windows 2008 Server. There was a nasty UAC - User Account Control which makes it difficult to configure Apache if we don't know about UAC on Windows 2008.]]></description>
			<content:encoded><![CDATA[<p>I would like to share my experiences with Apache installation on Windows 2008 Server.<br />
It's not a easy drive when you are installing deploying your open-source application on <strong>Microsoft Windows 2008 Server</strong>. There was a nasty <strong>UAC </strong>- <strong>User Account Control </strong>which makes it difficult to configure <strong>Apache</strong> if we don't know about <strong>UAC</strong> on <strong>Windows 2008</strong>.</p>
<p>So if we are installing Apache on Windows 2008 then first thing to take care is go to Control Panel &gt; User Accounts &gt; Enable or Disable UAC. Un-check the checkbox and Finish wizard. It will require a reboot. Once it is done Apache should be able to start without any problem. If you don't do that it gives really wired error which is "<strong>Unable to open logs</strong>" which really does not make any sense that why this is happening.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/php/beginner%e2%80%99s-resources-for-php-development/" rel="bookmark" title="February 15, 2008">Beginner&#8217;s Resources for PHP-MySQL Development</a></li>
<li><a href="http://blogs.digitss.com/php/setting-up-php-mysql-apache-with-most-up-to-date-wamp-package/" rel="bookmark" title="January 17, 2011">Setting up PHP, MySQL, Apache with most up-to-date WAMP Package</a></li>
<li><a href="http://blogs.digitss.com/microsoft/windows-terminal-server-and-user-auto-log-off-for-rdp/" rel="bookmark" title="July 11, 2009">Windows Terminal Server and User Auto Log-Off for RDP</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/" rel="bookmark" title="June 13, 2009">RSA server certificate CommonName (CN) does NOT match server name!?</a></li>
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
</ul>
<p><!-- Similar Posts took 11.002 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/installing-apache-on-windows-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating 2048-bit CSR with OpenSSL</title>
		<link>http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/</link>
		<comments>http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 13:37:27 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[csr]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=321</guid>
		<description><![CDATA[As computer processing power is increasing everyday, so breaking 1024-bit private key algorithms will be possible by 2011. So we will need to generate minimum 2048-bit RSA Private Keys for new SSL Certificates or renewals.]]></description>
			<content:encoded><![CDATA[<p>As computer processing power is increasing everyday, so breaking 1024-bit private key algorithms will be possible by 2011. So we will need to generate minimum <strong>2048-bit RSA Private Keys</strong> for new <strong>SSL Certificates</strong> or renewals.</p>
<p>I have recently faced similar case while I had given older CSR which I gave last year for the renewal to GoDaddy and it didn't worked due to security reasons.</p>
<p>We need to simply regenerate <strong>Private Key</strong> and <strong>CSR</strong> with the help of following <strong>OpenSSL</strong> command:</p>
<pre class="apache"> openssl req -nodes -newkey rsa:<span style="color: #ff0000;">2048</span> -keyout new-digitss.key -out new-digitss.csr</pre>
<p>This will generate 2048-bit key file and after that it will ask few basic information about the entity being certified. <strong>Private Key</strong> file generated with above command won't have secret pass-phrase so it won't be a problem deploying them on Windows based Apache server setups or either on Linux platforms. But if you really want to have pass-phrase then please refer to a <a title="How to generate Certificate Signing Request (CSR) file with Apache OpenSSL" href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" target="_self">previous post</a> and replace it with <strong>2048</strong> or <strong>4096</strong> instead of <strong>1024</strong> which is being used in commands or just remove the "-nodes" from the above command which will ask for a pass-phrase.</p>
<p>Removing the "-nodes" option from the above mentioned <strong>openssl</strong> command will ask for a pass-phrase and encrypt the private key. This can increase security, but please note that the pass-phrase will be required each time Apache is started. In that case you need to get a un-secure private key for your Windows based Apache setup. It is as simple as writing following line of command on <strong>OpenSSL</strong>.</p>
<pre class="apache"> rsa -in digitss.key -out unsecured.digitss.key</pre>
<p>Above <strong>OpenSSL</strong> command will give unsecured private key which will have pass-phrase removed and so can be used with <strong>Windows based Apache setups</strong>.</p>
<p><span style="text-decoration: underline;">More References:</span></p>
<p>For more detailed information on CSR generation please refer following post: (Just use 2048 or 4096 instead of 1024 to make it work)<br />
<a title="How to generate Certificate Signing Request (CSR) file with Apache OpenSSL" href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" target="_self">http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/</a></p>
<p>See GoDaddy Help for detailed reason on: <a title="Why does my CSR need to be 2048 bit length?" href="http://help.godaddy.com/article/5619" target="_blank">Why does my CSR need to be 2048 bit length?</a></p>
<p>CSR Generation Instructions for Rest of the Web-Servers: <a title="Certificate Signing Request (CSR) Generation Instructions" href="http://help.godaddy.com/topic/746/article/5343" target="_blank">Certificate Signing Request (CSR) Generation Instructions</a><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" rel="bookmark" title="April 13, 2008">How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/apache/installing-apache-on-windows-2008/" rel="bookmark" title="December 6, 2009">Installing Apache on Windows 2008</a></li>
<li><a href="http://blogs.digitss.com/php/beginner%e2%80%99s-resources-for-php-development/" rel="bookmark" title="February 15, 2008">Beginner&#8217;s Resources for PHP-MySQL Development</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/" rel="bookmark" title="June 13, 2009">RSA server certificate CommonName (CN) does NOT match server name!?</a></li>
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
</ul>
<p><!-- Similar Posts took 7.263 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Faster Page Loads with Apache mod_deflate output filtering</title>
		<link>http://blogs.digitss.com/apache/faster-page-loads-with-apache-mod_deflate-output-filtering/</link>
		<comments>http://blogs.digitss.com/apache/faster-page-loads-with-apache-mod_deflate-output-filtering/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 11:41:05 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=299</guid>
		<description><![CDATA[Apache 2.x is having module mod_deflate (mod_deflate.so) which can compress output irrespective of what scripting language you are using or even if you are serving a static but rich content website. If you are using PHP then there are ways available which can compress the output with buffering help but in that you need to write some code to make it happen but here we just need to enable mod_deflate module and add some configuration parameter and output compression will be taken care of by this module based on configuration provided.]]></description>
			<content:encoded><![CDATA[<p><strong>Apache</strong> 2.x is having module <strong>mod_deflate</strong> (mod_deflate.so) which can compress output irrespective of what scripting language you are using or even if you are serving a static but rich content website. If you are using PHP then there are ways available which can compress the output with buffering help but in that you need to write some code to make it happen but here we just need to enable mod_deflate module and add some configuration parameter and output compression will be taken care of by this module based on configuration provided.</p>
<p>Output compression is effective way of serving faster web-pages when you have content rich website with loads of html data, css and javascript assets in your web-site or web-application. It would help in saving bandwidth and data transfer over the wire (Internet) will be faster for users too. Though it will have impact on server's CPU utilization due to compression but this compression will be on the fly and level of compression will depend on server's load.</p>
<p>Still good practice is to use gzipped javascript assets as they will not be changed dynamically most of the time and we can save server's CPU utilization by not asking Apache to compress javascript files on each request.</p>
<p>To enable Apache &gt; mod_deflate module, make sure you enable module by un-commenting it from httpd.conf file.</p>
<pre>LoadModule deflate_module modules/mod_deflate.so</pre>
<p>Then change &lt;Directory ...&gt; sections for Document Root in httpd.conf file as following: <span id="more-299"></span></p>
<pre>#
# This should be changed to whatever you set DocumentRoot to.
#
&lt;Directory "d:/www"&gt;
 #
 # Possible values for the Options directive are "None", "All",
 # or any combination of:
 #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
 #
 # Note that "MultiViews" must be named *explicitly* --- "Options All"
 # doesn't give it to you.
 #
 # The Options directive is both complicated and important.  Please see
 # http://httpd.apache.org/docs/2.2/mod/core.html#options
 # for more information.
 #
 Options Indexes FollowSymLinks Includes ExecCGI

 #
 # AllowOverride controls what directives may be placed in .htaccess files.
 # It can be "All", "None", or any combination of the keywords:
 #   Options FileInfo AuthConfig Limit
 #
 AllowOverride All
 AllowOverride FileInfo
 #
 # Controls who can get stuff from this server.
 #
 Order allow,deny
 Allow from all

 AddOutputFilterByType DEFLATE text/plain
 AddOutputFilterByType DEFLATE text/html
 AddOutputFilterByType DEFLATE text/javascript
 AddOutputFilterByType DEFLATE text/css
 AddOutputFilterByType DEFLATE text/xml
 AddOutputFilterByType DEFLATE application/xhtml+xml
 AddOutputFilterByType DEFLATE application/javascript
 AddOutputFilterByType DEFLATE application/xml
 AddOutputFilterByType DEFLATE image/svg+xml
 AddOutputFilterByType DEFLATE application/rss+xml
 AddOutputFilterByType DEFLATE application/atom_xml
 AddOutputFilterByType DEFLATE application/x-javascript
 AddOutputFilterByType DEFLATE application/x-httpd-php
 AddOutputFilterByType DEFLATE application/x-httpd-fastphp
&lt;/Directory&gt;</pre>
<p>You can change/alter above filters based on your requirement, means that if you don't need some specific file-types not to be compressed then you can remove those filters by just removing those lines from above list. Almost all file-types are added in above mentioned configuration but if anything else needs to be added then just add another line next to if with "<b>AddOutputFilterByType DEFLATE &lt;FILE_TYPE_INFO&gt;</b>".</p>
<p>After making this change restart Apache service and to see the immediate difference go to <em>Information &gt; Document Size</em> option on your Firefox &gt; <a title="Web Developer Toolbar" href="http://blogs.digitss.com/misc/web-developer-toolbar-for-firefox-best-ever-extension-for-designerdeveloper/" target="_blank">Web Developer</a> toolbar.</p>
<div id="attachment_300" class="wp-caption alignleft" style="width: 262px"><img class="size-full wp-image-300" title="Document Size option in Web Developer toolbar" src="http://blogs.digitss.com/wp-content/uploads/2009/08/web_developer_toolbar.png" alt="Document Size option in Web Developer toolbar" width="252" height="493" /><p class="wp-caption-text">Document Size option in Web Developer toolbar</p></div>
<p>It will give detailed report of document assets/parts as seen in the next image with size after compression.</p>
<p><div id="attachment_301" class="wp-caption alignleft" style="width: 454px"><img class="size-full wp-image-301" title="Document Size: Report" src="http://blogs.digitss.com/wp-content/uploads/2009/08/document_size.png" alt="Document Size: Report" width="444" height="208" /><p class="wp-caption-text">Document Size: Report</p></div><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
<li><a href="http://blogs.digitss.com/apache/installing-apache-on-windows-2008/" rel="bookmark" title="December 6, 2009">Installing Apache on Windows 2008</a></li>
<li><a href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" rel="bookmark" title="April 13, 2008">How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/php/beginner%e2%80%99s-resources-for-php-development/" rel="bookmark" title="February 15, 2008">Beginner&#8217;s Resources for PHP-MySQL Development</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/" rel="bookmark" title="December 6, 2009">Generating 2048-bit CSR with OpenSSL</a></li>
</ul>
<p><!-- Similar Posts took 6.281 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/faster-page-loads-with-apache-mod_deflate-output-filtering/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>RSA server certificate CommonName (CN) does NOT match server name!?</title>
		<link>http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/</link>
		<comments>http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 18:32:16 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=245</guid>
		<description><![CDATA[SSL Library Error: 185073780 error:0B080074:x509 certificate]]></description>
			<content:encoded><![CDATA[<p><strong>Problem installing SSL certificate: SSL Library Error: 185073780 error:0B080074:x509 certificate </strong></p>
<p>While configuring SSL for one of my Client I got this error and it took me little while to figure it out that what went wrong with the configuration. Initially I thought that there must be something wrong with the generated certificate as I have generated CSR myself and given it to client and client gave back me Certificate files.</p>
<p>But I was wrong as I was using LogMeIn to connect to the client's Windows 2003 Web-Server and using remote clipboard (Copy+Paste). Something went wrong while pasting that file on the remote Web server. So I transferred files directly and then it worked well without any problem.</p>
<blockquote><p>
[Mon Jun 01 03:22:49 2009] [warn] RSA server certificate CommonName (CN) `portal.client.com' does NOT match server name!?<br />
[Mon Jun 01 03:22:49 2009] [error] Unable to configure RSA server private key<br />
[Mon Jun 01 03:22:49 2009] [error] SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
</p></blockquote>
<p>Reference URL that helped me find the answer is below:</p>
<p>http://www.howtoforge.com/forums/showthread.php?t=22493</p>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" rel="bookmark" title="April 13, 2008">How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/" rel="bookmark" title="December 6, 2009">Generating 2048-bit CSR with OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/browsers/this-download-has-been-blocked-by-your-security-zone-policy/" rel="bookmark" title="October 25, 2008">This download has been blocked by your security zone policy</a></li>
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
<li><a href="http://blogs.digitss.com/virtualization/vmware-workstation-this-virtual-machine-appears-to-be-in-use/" rel="bookmark" title="October 10, 2009">VMWare Workstation: This virtual machine appears to be in use.</a></li>
</ul>
<p><!-- Similar Posts took 12.678 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Allow only HTTPS access with .htaccess</title>
		<link>http://blogs.digitss.com/apache/allow-only-https-access-with-htaccess/</link>
		<comments>http://blogs.digitss.com/apache/allow-only-https-access-with-htaccess/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 14:58:11 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[https]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=233</guid>
		<description><![CDATA[If you want any of your web-directory to be accessed only via Secure HTTP (HTTPS) protocol then placing following code in ".htaccess" will make sure that any URL or Web-address will be converted from Http to Https.]]></description>
			<content:encoded><![CDATA[<p>If you want any of your web-directory to be accessed only via Secure HTTP (HTTPS) protocol then placing following code in "<strong>.htaccess</strong>" will make sure that any URL or Web-address will be converted from <strong>Http</strong> to <strong>Https</strong>.</p>
<pre>IndexIgnore *
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}</pre>
<p>It will rewrite all URLs with <strong>HTTPS </strong>instead of <strong>HTTP</strong>. This may be helpful in case while you want only specific directory to be accessed via <strong>Secure HTTP</strong> or you want your users to redirect to correct address/protocol when they type in <strong>http://</strong> by mistake and port 80 is not accessible.</p>
<p>It is also possible to do same with PHP or any other scripting language we use, but then it depends on the application and approach we choose.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/php/php-downloading-a-file-from-secure-website-https-using-curl/" rel="bookmark" title="October 25, 2008">PHP &#8211; Downloading a File from Secure website (https) using CURL</a></li>
<li><a href="http://blogs.digitss.com/php/using-zimbra-ldap-server-authentication-with-php/" rel="bookmark" title="August 23, 2009">Using Zimbra LDAP Server Authentication with PHP</a></li>
<li><a href="http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/" rel="bookmark" title="April 13, 2008">How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/database/mysql/backup-restore-mysql-db-using-mysqldump-quick-reference/" rel="bookmark" title="October 25, 2009">backup/restore MySQL db using MYSQLDUMP (quick reference)</a></li>
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
</ul>
<p><!-- Similar Posts took 13.839 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/allow-only-https-access-with-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to generate Certificate Signing Request (CSR) file with Apache OpenSSL</title>
		<link>http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/</link>
		<comments>http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 19:57:46 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[csr]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-files-with-apache-openssl/</guid>
		<description><![CDATA[When it comes to use SSL over apache, OpenSSL is there for us to do everything we want. XAMPP and WAMP both comes with OpenSSL compiled version of Apache, so it becomes quite handy to use it. But how to get SSL certificate for your website?For getting SSL certificate you need to ask your hosting [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to use SSL over apache, OpenSSL is there for us to do everything we want. <a title="XAMPP" href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP</a> and <a title="WampServer" href="http://www.wampserver.com/en/" target="_blank">WAMP</a> both comes with OpenSSL compiled version of Apache, so it becomes quite handy to use it. But how to get SSL certificate for your website?For getting SSL certificate you need to ask your hosting company if you are running on shared server and don't have access to apache installation directory and config files. Most of the hosting companies will do this for you with some amount of fee. Fee/cost depends on the kind of certificate you are requesting and for the period of time. For example www.domain.com certificates will be quite cheaper then *.domain.com.</p>
<p>Now if you are running and managing your own webserver and you have to get certificate(s) for your company/client or your own website then first requirement is to generate "Certificate Signing Request" - CSR file, which you need to send to Certificate Authority to sign and give back to you as CRT file. This tutorial is not meant for Apache expert but for those who have not much experience SSL and Apache stuff.</p>
<p>Generation of CSR files with Apache on OpenSSL is quite simple and it is matter of typing few commands and we are done. You need to follow similar commands on OpenSSL prompt whether you are running Apache over Windows or Linux. Here is the routine which we need to follow to get our .CSR file ready.</p>
<p>If you have your Apache setup ready with OpenSSL then goto BIN directory under your Apache's installation directory. If you are on Windows machine then it could be under D:\Program Files\Apache\bin and if it is Linux you know better where to find it. Open Command Prompt and goto Apache's BIN directory and then type "openssl" over there. You will get OpenSSL prompt immediately. You may need not to goto Apache/Bin directory if that path is set in your system variables, you can just type openssl and you will get the prompt like below.<span id="more-63"></span><br />
<img src="http://blogs.digitss.com/wp-content/uploads/2008/04/openssl_prompt.PNG" alt="OpenSSL Prompt" /><br />
<!--adsense--><br />
Now, first of all we need to generate RSA Private key for our server. This key will be Triple-DES encrypted and PEM formatted.  Type in following command to get encrypted private key on OpenSSL prompt.</p>
<pre class="apache">OpenSSL genrsa -des3 -out digitss.key <span style="color: #ff0000;">1024</span></pre>
<p>You can keep it my_server.key or something like that. Once you type in above command it will ask for pass-phrase, please keep a note of that pass-phrase at some secure place. Also, take backup of your private key file at some secure place. Here is the screen-shot(s) visualizing above command over windows command-line.</p>
<p><img src="http://blogs.digitss.com/wp-content/uploads/2008/04/private_key.PNG" alt="Generate Priavat Key" /><br />
<!--adsense--><br />
If you will try to see contents of that file it would look something similar to what I have got here.<br />
<img src="http://blogs.digitss.com/wp-content/uploads/2008/04/priavate_key_contents.PNG" alt="Priavate Key contents" /><br />
<!--adsense--><br />
To see something which is more readable type in following line and it will ask you pass-phrase which you previously specified.</p>
<pre class="apache">OpenSSL rsa -noout -text -in digitss.key
Enter pass phrase for digitss.key:
Private-Key: <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">1024</span> bit<span style="color: #66cc66;">&#41;</span>
modulus:
<span style="color: #ff0000;">00</span>:c6:<span style="color: #ff0000;">54</span>:<span style="color: #ff0000;">39</span>:f5:c5:ae:5a:ef:f5:<span style="color: #ff0000;">53</span>:9c:<span style="color: #ff0000;">13</span>:c9:<span style="color: #ff0000;">86</span>:
<span style="color: #ff0000;">27</span>:c5:<span style="color: #ff0000;">19</span>:9f:<span style="color: #ff0000;">25</span>:ab:a5:<span style="color: #ff0000;">96</span>:5a:2e:f3:c0:5b:b0:c5:
<span style="color: #ff0000;">02</span>:a6:e0:<span style="color: #ff0000;">53</span>:a8:fa:<span style="color: #ff0000;">34</span>:e1:8f:<span style="color: #ff0000;">55</span>:b4:ee:<span style="color: #ff0000;">57</span>:e3:<span style="color: #ff0000;">54</span>:
<span style="color: #ff0000;">65</span>:<span style="color: #ff0000;">70</span>:6a:f0:0c:4d:b1:ed:9f:<span style="color: #ff0000;">31</span>:<span style="color: #ff0000;">38</span>:<span style="color: #ff0000;">51</span>:3c:e1:<span style="color: #ff0000;">99</span>:
fe:<span style="color: #ff0000;">82</span>:6c:0d:3d:a5:d3:6e:<span style="color: #ff0000;">01</span>:8c:<span style="color: #ff0000;">89</span>:cc:f1:<span style="color: #ff0000;">97</span>:c0:
<span style="color: #ff0000;">95</span>:0e:<span style="color: #ff0000;">80</span>:1a:c7:0a:ac:<span style="color: #ff0000;">56</span>:<span style="color: #ff0000;">15</span>:<span style="color: #ff0000;">27</span>:cd:<span style="color: #ff0000;">08</span>:<span style="color: #ff0000;">32</span>:e0:2c:
<span style="color: #ff0000;">39</span>:<span style="color: #ff0000;">00</span>:<span style="color: #ff0000;">77</span>:2f:d1:<span style="color: #ff0000;">83</span>:4f:2e:ff:ea:<span style="color: #ff0000;">50</span>:fb:<span style="color: #ff0000;">26</span>:6c:fd:
dd:ea:<span style="color: #ff0000;">38</span>:3b:ec:c0:f7:d3:c6:c2:<span style="color: #ff0000;">23</span>:<span style="color: #ff0000;">20</span>:<span style="color: #ff0000;">12</span>:<span style="color: #ff0000;">40</span>:bf:
1b:<span style="color: #ff0000;">94</span>:<span style="color: #ff0000;">59</span>:d8:d6:<span style="color: #ff0000;">34</span>:8d:7c:dd
publicExponent: <span style="color: #ff0000;">65537</span> <span style="color: #66cc66;">&#40;</span>0x10001<span style="color: #66cc66;">&#41;</span>
privateExponent:
<span style="color: #ff0000;">23</span>:5b:b8:c9:9c:<span style="color: #ff0000;">68</span>:ad:<span style="color: #ff0000;">45</span>:c2:<span style="color: #ff0000;">93</span>:<span style="color: #ff0000;">19</span>:6c:5d:ad:<span style="color: #ff0000;">51</span>:
<span style="color: #ff0000;">31</span>:ce:<span style="color: #ff0000;">83</span>:<span style="color: #ff0000;">95</span>:0f:b9:<span style="color: #ff0000;">01</span>:c9:2a:3d:c2:b9:<span style="color: #ff0000;">96</span>:<span style="color: #ff0000;">16</span>:<span style="color: #ff0000;">49</span>:
<span style="color: #ff0000;">96</span>:be:bf:ab:8c:<span style="color: #ff0000;">90</span>:<span style="color: #ff0000;">08</span>:f6:a8:ed:0c:e1:<span style="color: #ff0000;">16</span>:<span style="color: #ff0000;">62</span>:<span style="color: #ff0000;">61</span>:
<span style="color: #ff0000;">83</span>:5d:4d:<span style="color: #ff0000;">56</span>:a4:<span style="color: #ff0000;">33</span>:<span style="color: #ff0000;">68</span>:8d:cd:<span style="color: #ff0000;">14</span>:a1:<span style="color: #ff0000;">47</span>:1d:<span style="color: #ff0000;">61</span>:7b:
<span style="color: #ff0000;">02</span>:7d:<span style="color: #ff0000;">89</span>:0e:<span style="color: #ff0000;">77</span>:f9:0b:b9:<span style="color: #ff0000;">89</span>:<span style="color: #ff0000;">02</span>:a5:e1:0a:ba:<span style="color: #ff0000;">66</span>:
f2:<span style="color: #ff0000;">25</span>:dc:<span style="color: #ff0000;">06</span>:7e:<span style="color: #ff0000;">74</span>:b2:c7:6a:be:1a:e1:6f:fb:b7:
e2:2d:b5:f2:ca:a8:ec:<span style="color: #ff0000;">27</span>:9e:<span style="color: #ff0000;">81</span>:<span style="color: #ff0000;">25</span>:7e:8a:2d:6c:
<span style="color: #ff0000;">94</span>:6f:f5:ca:f3:4e:bc:3d:1e:e9:5d:<span style="color: #ff0000;">74</span>:<span style="color: #ff0000;">47</span>:<span style="color: #ff0000;">59</span>:8c:
f7:<span style="color: #ff0000;">29</span>:d8:8e:9c:d2:e0:<span style="color: #ff0000;">01</span>
prime1:
<span style="color: #ff0000;">00</span>:f4:<span style="color: #ff0000;">85</span>:<span style="color: #ff0000;">25</span>:2e:6c:<span style="color: #ff0000;">02</span>:<span style="color: #ff0000;">79</span>:<span style="color: #ff0000;">02</span>:<span style="color: #ff0000;">58</span>:c9:ec:<span style="color: #ff0000;">29</span>:a8:<span style="color: #ff0000;">11</span>:
<span style="color: #ff0000;">33</span>:9e:db:bf:<span style="color: #ff0000;">84</span>:0a:a2:<span style="color: #ff0000;">87</span>:f9:2b:<span style="color: #ff0000;">82</span>:f5:a0:<span style="color: #ff0000;">04</span>:<span style="color: #ff0000;">59</span>:
<span style="color: #ff0000;">69</span>:bb:f7:d3:6a:d8:ee:6d:<span style="color: #ff0000;">74</span>:0e:bb:<span style="color: #ff0000;">62</span>:<span style="color: #ff0000;">01</span>:8e:bf:
5f:<span style="color: #ff0000;">85</span>:d8:3d:de:e9:<span style="color: #ff0000;">12</span>:<span style="color: #ff0000;">86</span>:c9:<span style="color: #ff0000;">20</span>:de:7c:cf:4c:f2:
6a:1b:<span style="color: #ff0000;">40</span>:e2:<span style="color: #ff0000;">01</span>
prime2:
<span style="color: #ff0000;">00</span>:cf:a3:ea:a4:<span style="color: #ff0000;">39</span>:<span style="color: #ff0000;">10</span>:6c:4e:3c:<span style="color: #ff0000;">58</span>:b1:8e:f0:<span style="color: #ff0000;">17</span>:
<span style="color: #ff0000;">33</span>:ea:1f:9d:0c:be:0a:bd:3b:d5:<span style="color: #ff0000;">80</span>:<span style="color: #ff0000;">76</span>:<span style="color: #ff0000;">70</span>:e3:e4:
<span style="color: #ff0000;">54</span>:4f:1a:8f:8a:ab:<span style="color: #ff0000;">00</span>:d5:<span style="color: #ff0000;">64</span>:e6:8a:e7:<span style="color: #ff0000;">24</span>:<span style="color: #ff0000;">12</span>:2b:
3e:<span style="color: #ff0000;">97</span>:b9:<span style="color: #ff0000;">24</span>:<span style="color: #ff0000;">96</span>:b5:f4:<span style="color: #ff0000;">31</span>:eb:ae:6d:fa:<span style="color: #ff0000;">83</span>:b2:<span style="color: #ff0000;">32</span>:
<span style="color: #ff0000;">92</span>:8b:<span style="color: #ff0000;">06</span>:<span style="color: #ff0000;">62</span>:dd
exponent1:
<span style="color: #ff0000;">00</span>:b4:<span style="color: #ff0000;">40</span>:d2:bf:fd:ef:<span style="color: #ff0000;">74</span>:b5:3e:2e:dc:<span style="color: #ff0000;">61</span>:<span style="color: #ff0000;">78</span>:fc:
<span style="color: #ff0000;">34</span>:<span style="color: #ff0000;">77</span>:9f:<span style="color: #ff0000;">16</span>:f7:<span style="color: #ff0000;">87</span>:bf:<span style="color: #ff0000;">78</span>:ed:3e:1e:<span style="color: #ff0000;">34</span>:<span style="color: #ff0000;">63</span>:d9:d0:
f0:<span style="color: #ff0000;">19</span>:<span style="color: #ff0000;">19</span>:<span style="color: #ff0000;">00</span>:<span style="color: #ff0000;">49</span>:6b:d1:<span style="color: #ff0000;">97</span>:ee:4e:4d:e4:<span style="color: #ff0000;">59</span>:b1:<span style="color: #ff0000;">99</span>:
<span style="color: #ff0000;">72</span>:<span style="color: #ff0000;">19</span>:<span style="color: #ff0000;">80</span>:e7:5b:<span style="color: #ff0000;">44</span>:<span style="color: #ff0000;">05</span>:dc:<span style="color: #ff0000;">46</span>:b8:6c:4b:<span style="color: #ff0000;">25</span>:a6:5b:
ad:cc:<span style="color: #ff0000;">99</span>:<span style="color: #ff0000;">70</span>:<span style="color: #ff0000;">01</span>
exponent2:
<span style="color: #ff0000;">00</span>:b8:a7:<span style="color: #ff0000;">83</span>:<span style="color: #ff0000;">41</span>:ec:<span style="color: #ff0000;">65</span>:<span style="color: #ff0000;">88</span>:8b:c2:ea:f5:6c:b2:<span style="color: #ff0000;">63</span>:
<span style="color: #ff0000;">33</span>:<span style="color: #ff0000;">98</span>:9f:e8:a0:ae:<span style="color: #ff0000;">59</span>:0a:<span style="color: #ff0000;">94</span>:ad:<span style="color: #ff0000;">78</span>:<span style="color: #ff0000;">02</span>:dc:be:2e:
3e:<span style="color: #ff0000;">34</span>:<span style="color: #ff0000;">12</span>:e0:d8:<span style="color: #ff0000;">66</span>:de:e4:e7:<span style="color: #ff0000;">48</span>:<span style="color: #ff0000;">86</span>:fa:ab:7f:<span style="color: #ff0000;">64</span>:
e9:d3:<span style="color: #ff0000;">30</span>:<span style="color: #ff0000;">19</span>:<span style="color: #ff0000;">33</span>:d6:<span style="color: #ff0000;">38</span>:<span style="color: #ff0000;">86</span>:<span style="color: #ff0000;">34</span>:9b:f8:be:<span style="color: #ff0000;">32</span>:<span style="color: #ff0000;">64</span>:<span style="color: #ff0000;">44</span>:
c9:<span style="color: #ff0000;">41</span>:cd:ba:<span style="color: #ff0000;">19</span>
coefficient:
7c:9a:fa:<span style="color: #ff0000;">80</span>:<span style="color: #ff0000;">72</span>:8a:<span style="color: #ff0000;">74</span>:<span style="color: #ff0000;">11</span>:7b:f0:<span style="color: #ff0000;">32</span>:d0:e4:b3:<span style="color: #ff0000;">44</span>:
cd:d4:2c:4e:6b:<span style="color: #ff0000;">37</span>:<span style="color: #ff0000;">38</span>:<span style="color: #ff0000;">68</span>:9a:6e:cd:ae:f0:9f:<span style="color: #ff0000;">54</span>:
<span style="color: #ff0000;">31</span>:a5:f6:f7:c8:<span style="color: #ff0000;">16</span>:f3:1a:4a:5c:d3:6b:<span style="color: #ff0000;">60</span>:a1:7d:
f5:a2:6c:b2:ab:<span style="color: #ff0000;">12</span>:1d:1c:5c:dd:<span style="color: #ff0000;">63</span>:<span style="color: #ff0000;">57</span>:d5:c0:be:
a3:d1:<span style="color: #ff0000;">37</span>:<span style="color: #ff0000;">67</span>
OpenSSL</pre>
<p>Although it is hardly readable but makes more sense then previous screenshot.</p>
<p>Later on we need to specify path of this file in our httpd-ssl.conf when we get CRT file signed by Authority and we are setting up SSL over our webserver. It is required to have unsecured version of this file as with Windows Apache + OpenSSL setup it's not possible to specify "pass-phrase" (which we have given earlier) and it will give some weired error while setting up SSL and apache will refuse to start and generate errors in log for that.<br />
So to get Unsecured version of this file type following command:</p>
<pre class="apache">OpenSSL rsa -in digitss.key -out unsecured.digitss.key
Enter pass phrase for digitss.key:
writing RSA key
OpenSSL</pre>
<p>Here, digitss.key is the file which we have previously generated and it is encrypted (3-DES), and -out file is the one which will be generated based on our request in non-encrypted form. During this process it will ask for pass-phrase as usual.</p>
<p>Now let's move to final step which is generation of CSR file using RSA private key. Following command will generate Certificate Signing Request file for us which will be PEM formatted. Key in following command:</p>
<pre class="apache">OpenSSL req -new -key digitss.key -out digitss.csr</pre>
<p>If you are running over Windows then probably you will get error which I have faced during this. It would be something similar to following:</p>
<pre class="apache">OpenSSL req -new -key digitss.key -out digitss.csr
Unable to load config info <span style="color: #00007f;">from</span> /usr/local/ssl/openssl.cnf</pre>
<p>In that case we need to specify one more parameter in this command and we are done.</p>
<pre class="apache">OpenSSL req -new -key digitss.key -out digitss.csr -config openssl.cnf</pre>
<p>Here, in this command we are making request for generation of CSR file with our private key generated previously and here we have specified configuration file as "openssl.cnf" as one more parameter. If this file doesn't exist in apache/bin directory then either move it there or specify full path. After keying in above command it will prompt you with few parameters/questions and that's it we are done.<br />
Here is the list of question you need to answer as in you type above command to generate CSR file. Provided for your reference just as an example.</p>
<pre class="apache">OpenSSL req -new -key digitss.key -out digitss.csr -config openssl.cnf
Enter pass phrase for digitss.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter <span style="color: #7f007f;">'.'</span>, the field will be left blank.
-----
Country Name <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">2</span> letter code<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span>AU<span style="color: #66cc66;">&#93;</span>:US
State or Province Name <span style="color: #66cc66;">&#40;</span>full name<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span>Some-State<span style="color: #66cc66;">&#93;</span>:Newyork
Locality Name <span style="color: #66cc66;">&#40;</span>eg, city<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:Bellrose
Organization Name <span style="color: #66cc66;">&#40;</span>eg, company<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span>Internet Widgits Pty Ltd<span style="color: #66cc66;">&#93;</span>:DiGiTSS Inc
Organizational Unit Name <span style="color: #66cc66;">&#40;</span>eg, section<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:DiGiTSS
Common Name <span style="color: #66cc66;">&#40;</span>eg, YOUR name<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:www.digitss.com
Email Address <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:dharmavir@digitss.com
Please enter the following <span style="color: #7f007f;">'extra'</span> attributes
to be sent with your certificate request
A challenge password <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:password
An optional company name <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>:blogs@DiGiTSS
OpenSSL</pre>
<p>We are almost done, now we need to send this generated CSR file to a Certifying Authority (CA) for signing, they will send back us Real Certificate CRT file with the help of which we can setup SSL over our webserver running Apache and OpenSSL. We can either send it to <a title="Verisign" href="http://digitalid.verisign.com/server/apacheNotice.htm" target="_blank">Verisign,</a> <a title="Thawte Consulting" href="http://www.thawte.com/ssl-digital-certificates/buy-ssl-certificates" target="_blank">Thawte Consulting</a>,  <a title="CertiSign Certificadora Digital Ltd" href="http://www.certisign.com" target="_blank">CertiSign Certificadora Digital Ltd</a> or  <a title="GoDaddy" href="http://www.godaddy.com/" target="_blank">GoDaddy</a>.<br />
<!--adsense--><br />
Please note that I have used all commands on Linux server as well and they will work same as they they work on Windows.</p>
<p>For more advance options or more help you can refer to <a title="modssl home" href="http://www.modssl.org" target="_blank">www.modssl.org</a>'s <a title="ModSSL FAQs" href="http://www.modssl.org/docs/2.8/ssl_faq.html" target="_blank">FAQ section</a>.<br />
Have your comments on this post.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/apache/openssl/generating-2048-bit-csr-with-openssl/" rel="bookmark" title="December 6, 2009">Generating 2048-bit CSR with OpenSSL</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/" rel="bookmark" title="June 13, 2009">RSA server certificate CommonName (CN) does NOT match server name!?</a></li>
<li><a href="http://blogs.digitss.com/apache/mod_proxy-mod_vhost_alias-to-host-multiple-domains-on-web-server-and-running-apache-iis-together/" rel="bookmark" title="April 4, 2010">mod_proxy &#038; mod_vhost_alias to host multiple domains on Web-Server and running Apache+IIS together</a></li>
<li><a href="http://blogs.digitss.com/php/php-downloading-a-file-from-secure-website-https-using-curl/" rel="bookmark" title="October 25, 2008">PHP &#8211; Downloading a File from Secure website (https) using CURL</a></li>
<li><a href="http://blogs.digitss.com/php/beginner%e2%80%99s-resources-for-php-development/" rel="bookmark" title="February 15, 2008">Beginner&#8217;s Resources for PHP-MySQL Development</a></li>
</ul>
<p><!-- Similar Posts took 4.771 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/apache/how-to-generate-certificate-signing-request-csr-file-with-apache-openssl/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.571 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-08-30 01:33:09 -->

