<?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>Gudasoft &#187; apache</title>
	<atom:link href="http://www.gudasoft.com/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gudasoft.com</link>
	<description>Impossible is nothing</description>
	<lastBuildDate>Mon, 26 Jul 2010 10:22:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Logs monitoring</title>
		<link>http://www.gudasoft.com/english/linux/administration-linux/04/09/668/logs-monitoring/2009</link>
		<comments>http://www.gudasoft.com/english/linux/administration-linux/04/09/668/logs-monitoring/2009#comments</comments>
		<pubDate>Thu, 09 Apr 2009 13:51:02 +0000</pubDate>
		<dc:creator>guda</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.gudasoft.com/?p=668</guid>
		<description><![CDATA[I have been asked from one my friends who hosts many websites on single machine to help him to find which vhost is doing some slow requests. the load of the machine from 0.5 has become 1.5. and there are some apache processess eating the CPU. It is obvious that some php file is slowing [...]]]></description>
			<content:encoded><![CDATA[<p>I have been asked from one my friends who hosts many websites on single machine to help him to find which vhost is doing some slow requests.</p>
<p>the load of the machine from 0.5 has become 1.5. and there are some apache processess eating the CPU.</p>
<p>It is obvious that some php file is slowing down all the machine but who?</p>
<p>I found this wonderfull tool in Internet</p>
<p>http://code.google.com/p/wtop/wiki/Installing</p>
<p>http://code.google.com/p/wtop/wiki/LogrepCookbook</p>
<p>With this script I can monitor all the pages and not sitting in the dark while some evil pages are drying the CPU power.</p>
<pre class="prettyprint"><a id="Keep_a_watch_out_for_slow_requests_as_they_happen:"><span class="pln">logrep </span><span class="pun">-</span><span class="pln">m tail </span><span class="pun">-</span><span class="pln">f </span><span class="str">'msec&gt;1000'</span><span class="pln"> </span><span class="pun">-</span><span class="pln">o </span><span class="str">'ts,ip,msec,class,url' *.log</span></a></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gudasoft.com/english/linux/administration-linux/04/09/668/logs-monitoring/2009/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a self-signed SSL Certificate &#8230;</title>
		<link>http://www.gudasoft.com/english/linux/administration-linux/01/03/382/how-to-create-a-self-signed-ssl-certificate/2009</link>
		<comments>http://www.gudasoft.com/english/linux/administration-linux/01/03/382/how-to-create-a-self-signed-ssl-certificate/2009#comments</comments>
		<pubDate>Sat, 03 Jan 2009 15:48:47 +0000</pubDate>
		<dc:creator>guda</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.gudasoft.com/?p=382</guid>
		<description><![CDATA[Low cost certificates Certificates in this category should cost under US$50 annually and include availability from Trusted CAs ipsCA and FreeSSL.com. As these certificates do not carry a known brand, fraud control or human support, they are suitable for non- or light commerce environments, though they do provide bonus 128-bit encryption. According to FreeSSL.com, a [...]]]></description>
			<content:encoded><![CDATA[<h1>Low cost certificates</h1>
<p>Certificates in this category should cost under US$50 annually and include availability from Trusted CAs <a class="sublink" rel="external" href="http://certificates.ipsca.com/Products/SSLServer.asp">ipsCA</a> and <a class="sublink" rel="external" href="http://www.freessl.com/">FreeSSL.com</a>. As these certificates do not carry a known brand, fraud control or human support, they are suitable for non- or light commerce environments, though they do provide bonus 128-bit encryption. According to FreeSSL.com, a light commerce environment is one with no more than 50 transactions weekly, and an average transaction value of US$50.</p>
<h1><span lang="en-us">How to create a self-signed</span> SSL <span lang="en-us">Certificate &#8230;</span></h1>
<p class="big"><span lang="en-us">&#8230;  which can be used for testing             purposes or internal usage</span></p>
<hr noshade="noshade" />
<p class="big"><span lang="en-us">Overview</span></p>
<blockquote><p><span lang="en-us">The following is an extremely simplified view of how SSL is               implemented and what part the certificate plays in the entire process.</span></p>
<p><span lang="en-us">Normal web traffic is sent unencrypted over the Internet. That is,               anyone with access to the right tools can snoop all of that traffic. Obviously, this               can lead to problems, especially where security and privacy is necessary, such as in               credit card data and bank transactions. The Secure Socket Layer is used to encrypt               the data stream between the web server and the web client (the browser).</span></p>
<p><span lang="en-us">SSL makes use of what is known as <strong>asymmetric cryptography</strong>,               commonly referred to as <strong>public key cryptography (PKI)</strong>. With public key               cryptography, two keys are created, one public, one private. Anything encrypted with               either key can only be decrypted with its corresponding key. Thus if a message or               data stream were encrypted with the server&#8217;s private key, it can be decrypted only               using its corresponding public key, ensuring that the data only could have come from               the server.</span></p>
<p><span lang="en-us">If SSL utilizes public key cryptography to encrypt the data stream               traveling over the Internet, why is a certificate necessary? The technical answer to               that question is that a certificate is not really necessary</span> &#8211; <span lang="en-us">the data is secure and cannot easily be decrypted by a third party. However,               certificates do serve a crucial role in the communication process. The certificate,               signed by a trusted Certificate Authority (CA), ensures that the certificate holder               is really who he claims to be. Without a trusted signed certificate, your data may be               encrypted, however, the party you are communicating with may not be whom you think.               Without certificates, impersonation attacks would be much more common.</span></p></blockquote>
<p class="big">Step 1: <span lang="en-us">Gener</span>ate a <span lang="en-us">Private Key</span></p>
<blockquote>
<p class="normal"><span lang="en-us">The <strong>openssl</strong> toolkit is used to generate an <strong>RSA Private               Key</strong> and <strong>CSR (Certificate Signing Request)</strong>. It can also be used to generate               self-signed certificates which can be used for testing purposes or internal               usage.</span></p>
<p class="normal"><span lang="en-us">The first step is to create your RSA Private Key. This key is a               1024 bit RSA key which is encrypted using Triple-DES and stored in a PEM format so               that it is readable as ASCII text.</span></p>
<p class="courier"><strong>openssl genrsa -des3 -out server.key 1024</strong></p>
<p><strong></strong> <span style="color: #0000ff;">Generating RSA private key, 1024 bit long modulus<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;++++++<br />
&#8230;&#8230;..++++++<br />
e is 65537 (0&#215;10001)<br />
Enter PEM pass phrase:<br />
Verifying password &#8211; Enter PEM pass phrase:</span></p></blockquote>
<p class="big">Step 2: Generate a CSR (Certificate Signing Request)</p>
<blockquote>
<p class="normal">Once the private key is generated a Certificate Signing Request can be generated. The               CSR is then used in one of two ways. Ideally, the CSR will be sent to a Certificate               Authority, such as Thawte or Verisign who will verify the identity of the requestor               and issue a signed certificate. <strong>The second option is to self-sign the CSR, which               will be demonstrated in the next section</strong>.</p>
<p class="normal">During the generation of the CSR, you will be prompted for several pieces of               information. These are the X.509 attributes of the certificate. One of the prompts               will be for &#8220;Common Name (e.g., YOUR name)&#8221;. It is important that this field be               filled in with the fully qualified domain name of the server to be protected by SSL.               If the website to be protected will be https://public.akadia.com, then enter               public.akadia.com at this prompt. The command to generate the CSR is as follows:</p>
<p class="courier"><strong>openssl req -new -key server.key -out server.csr</strong></p>
<p><strong></strong> <span style="color: #0000ff;">Country Name (2 letter code) [GB]</span>:<strong>CH</strong><br />
<span style="color: #0000ff;">State or Province Name (full name)               [Berkshire]</span>:<strong>Bern</strong><br />
<span style="color: #0000ff;">Locality Name (eg, city)               [Newbury]</span>:<strong>Oberdiessbach</strong><br />
<span style="color: #0000ff;">Organization Name (eg, company) [My Company               Ltd]</span>:<strong>Akadia AG</strong><br />
<span style="color: #0000ff;">Organizational Unit Name (eg, section)               []</span>:<strong>Information Technology</strong><br />
<span style="color: #0000ff;">Common Name (eg, your name or your server&#8217;s hostname)               []</span>:<strong>public.akadia.com</strong><br />
<span style="color: #0000ff;">Email Address []</span>:<strong>martin dot zahn at akadia dot ch</strong><br />
<span style="color: #0000ff;">Please enter the following &#8216;extra&#8217; attributes<br />
to be sent with your certificate request<br />
A challenge password []:<br />
An optional company name []:</span></p></blockquote>
<p class="big">Step 3: Remove Passphrase from Key</p>
<blockquote>
<p class="normal">One unfortunate side-effect of the pass-phrased private key is <strong>that Apache will               ask for the pass-phrase each time the web server is started</strong>. Obviously this is               not necessarily convenient as someone will not always be around to type in the               pass-phrase, such as after a reboot or crash. mod_ssl includes the ability to use an               external program in place of the built-in pass-phrase dialog, however, this is not               necessarily the most secure option either. <strong>It is possible to remove the Triple-DES               encryption from the key</strong>, thereby no longer needing to type in a pass-phrase. If               the private key is no longer encrypted, it is critical that this file only be               readable by the root user! If your system is ever compromised and a third party               obtains your unencrypted private key, the corresponding certificate will need to be               revoked. With that being said, use the following command to remove the pass-phrase               from the key:</p>
<p class="courier"><strong>cp server.key server.key.org<br />
openssl rsa -in server.key.org -out server.key</strong></p>
<p>The newly created server.key file has no more passphrase in it.</p>
<p class="courier"><span style="color: #0000ff;">-rw-r&#8211;r&#8211; 1 root root 745 Jun 29 12:19 server.csr<br />
-rw-r&#8211;r&#8211; 1 root root 891 Jun 29 13:22 server.key<br />
-rw-r&#8211;r&#8211; 1 root root 963 Jun 29 13:22 server.key.org</span></p></blockquote>
<p class="big">Step 4: Generating a Self-Signed Certificate</p>
<blockquote><p>At this point you will need to generate a self-signed certificate because you either               don&#8217;t plan on having your certificate signed by a CA, or you wish to test your new               SSL implementation while the CA is signing your certificate. This temporary               certificate will generate an error in the client browser to the effect that the               signing certificate authority is unknown and not trusted.</p>
<p>To generate a temporary certificate which is good for 365 days, issue the following               command:</p>
<p class="courier"><strong>openssl x509 -req -days 365 -in server.csr -signkey server.key -out               server.crt</strong><br />
<span style="color: #0000ff;">Signature ok<br />
subject=/C=CH/ST=Bern/L=Oberdiessbach/O=Akadia AG/OU=Information<br />
Technology/CN=public.akadia.com/Email=martin dot zahn at akadia dot ch<br />
Getting Private key</span></p></blockquote>
<p class="big">Step 5: Installing the Private Key and Certificate</p>
<blockquote><p>When Apache with mod_ssl is installed, it creates several directories in the Apache               config directory. The location of this directory will differ depending on how Apache               was compiled.</p>
<p class="courier"><strong>cp server.crt /usr/local/apache/conf/ssl.crt<br />
cp server.key /usr/local/apache/conf/ssl.key</strong></p></blockquote>
<p class="big">Step 6: Configuring SSL Enabled Virtual Hosts</p>
<blockquote>
<p class="courier"><strong>SSLEngine on<br />
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt<br />
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key<br />
SetEnvIf User-Agent &#8220;.*MSIE.*&#8221; nokeepalive ssl-unclean-shutdown<br />
CustomLog logs/ssl_request_log \<br />
&#8220;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \&#8221;%r\&#8221; %b&#8221;</strong></p></blockquote>
<p class="big"><strong>Step 7: Restart Apache and Test</strong></p>
<blockquote>
<p class="courier"><strong>/etc/init.d/httpd stop<br />
/etc/init.d/httpd stop</strong></p>
<p class="courier"><strong>https://public.akadia.com</strong></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.gudasoft.com/english/linux/administration-linux/01/03/382/how-to-create-a-self-signed-ssl-certificate/2009/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
