<?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>JackKozik.com &#187; Apache</title> <atom:link href="http://jackkozik.com/tag/apache/feed/" rel="self" type="application/rss+xml" /><link>http://jackkozik.com</link> <description>Web Programming, Home Networking and Personal Travel</description> <lastBuildDate>Mon, 04 Sep 2023 14:26:56 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.9.2</generator> <item><title>Install Apache web server on Windows 7 with php</title><link>http://jackkozik.com/install-apache-httpd-and-php-on-windows-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-apache-httpd-and-php-on-windows-7</link> <comments>http://jackkozik.com/install-apache-httpd-and-php-on-windows-7/#comments</comments> <pubDate>Tue, 11 Dec 2012 22:14:23 +0000</pubDate> <dc:creator><![CDATA[Jack Kozik]]></dc:creator> <category><![CDATA[Web Programming]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[httpd]]></category> <category><![CDATA[php]]></category> <category><![CDATA[Windows 7]]></category><guid isPermaLink="false">http://jackkozik.com/?p=172</guid> <description><![CDATA[<p>Here&#8217;s the steps I followed to install Apache web server on Windows 7 with php. I have been running an application on a Windows XP PC for years.  The application was web enabled on top of Apache for Windows.  This note captures the steps to move my application over to my Win7 PC; since I&#8217;ve [&#8230;]</p><p>The post <a rel="nofollow" href="http://jackkozik.com/install-apache-httpd-and-php-on-windows-7/">Install Apache web server on Windows 7 with php</a> appeared first on <a rel="nofollow" href="http://jackkozik.com">JackKozik.com</a>.</p> ]]></description> <content:encoded><![CDATA[<p style="text-align: center;"><a href="http://httpd.apache.org/"><img class="size-medium wp-image-295 aligncenter" title="Apache Server Project" src="http://jackkozik.com/wp-content/uploads/2012/12/ApacheWerverProject-300x40.png" alt="" width="300" height="40" /></a></p><p style="text-align: left;">Here&#8217;s the steps I followed to install Apache web server on Windows 7 with php.</p><p>I have been running an application on a Windows XP PC for years.  The application was web enabled on top of Apache for Windows.  This note captures the steps to move my application over to my Win7 PC; since I&#8217;ve done this before, this should be easy.  Well no, I had some bumps and these notes are to help me for next time.</p><p>For starters, I decided to follow the nice <a href="http://www.badprog.com/windows-7-installing-php-apache-http-mysql-phpmyadmin-on-windows">how-to found at Badprog.</a></p><p>1. Install Apache httpd.</p><ul><li>Download from <a href="http://mirror.nexcess.net/apache/httpd/">here</a></li><li>For Network Domain, I entered my domain name.</li><li>For Server Name, I entered my private IP address, 192.168.x.x</li><li>I verified my setup, by trying http://192.168.x.x.  Look for &#8220;It Works!&#8221;</li></ul><p>.2. Install PHP</p><ul><li>Download from <a href="http://windows.php.net/download/">here</a>. I used VC9 x86 Thread Safe (2012-Nov-21 21:22:38), v5.4.9</li><li>unzip and copy to C:\Program Files (x86)\PHP</li><li>rename folder to php-5.4.9</li></ul><p>3. Configure</p><ul><li>C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf</li></ul><pre class="brush: php; title: ; notranslate">
 LoadModule php5_module &quot;C:/Program files (x86)/\
 PHP/php-5.4.9/php5apache2_2.dll&quot;
 LoadModule ssl_module modules/mod_ssl.so
 LoadModule rewrite_module modules/mod_rewrite.so
 AddType application/x-httpd-php .php
 # for .htaccess
 AllowOverride All
 # for dir_module
 DirectoryIndex index.php index.html
 &lt;Directory &quot;C:/public_html&quot;&gt;
 Include conf/extra/httpd-ssl.conf
 # at end of file:
 PHPIniDir &quot;C:/Program Files (x86)/PHP/php-5.4.9&quot;
</pre><ul><li>In same directory create a .htpasswd file</li><li>In c:\public_html, create file phptest.php</li></ul><pre class="brush: php; title: ; notranslate">
 &lt;?php
 phpinfo();
 ?&gt;
 </pre><ul><li>create file .htaccess</li></ul><pre class="brush: php; title: ; notranslate">
AuthUserFile &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/.htpasswd&quot;
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic require user j****k
</pre><ul><li>verify http://192.168.100.153/phptest.php</li><li>C:\Program Files (x86)\PHP\php-5.4.9:<ul><li>rename php.ini-development -&gt; php.ini</li></ul></li></ul><pre class="brush: php; title: ; notranslate">
 date.timezone = &quot;America/Chicago&quot;
 ForceType application/x-httpd-php
</pre><h2>Key stuck point for me when setting up my Apache Web Server on Windows 7:</h2><p>Remember: restart httpd with &#8220;Run as Administrator&#8221; !!</p><p style="text-align: center;"><a href="http://jackkozik.com/wp-content/uploads/2012/12/ApacheRestart.png"><img class="size-medium wp-image-292 aligncenter" title="Apache Restart" src="http://jackkozik.com/wp-content/uploads/2012/12/ApacheRestart-300x276.png" alt="Restart - must run as Administrator" width="300" height="276" /></a></p><p style="text-align: left;">Whenever the httpd.conf file is changed you need to restart the Apache web server.  Just selecting and running Restart doesn&#8217;t work, except if you run it as an Administrator. From the Start menu, find Restart, the right-mouse click it, and select &#8220;Run as Administrator.&#8221; It took me two hours to figure this out.  Since my old installation was on Windows XP, I never had this issue.</p><p>4. Configure SSL</p><ul><li>edit file: &#8220;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/extra/httpd-ssl.con&#8221;</li></ul><pre class="brush: php; title: ; notranslate">
 DocumentRoot &quot;c:/public_html&quot;
 Servername cisco163.kozikfamily.net:443
 SSLCertificateFile &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/cisco163_kozikfamily_net.crt&quot;
 SSLCertificateKeyFile &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/cisco163.kozikfamily.net.key&quot;
 SSLCertificateChainFile &quot;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/cisco163_kozikfamily_net.ca-bundle&quot;

#Because of syntax error on Windows:
SSLSessionCache &quot;shmcb:C:/Progra\~2/Zend/Apache2/logs/ssl_scache(512000)&quot;
</pre><p>The post <a rel="nofollow" href="http://jackkozik.com/install-apache-httpd-and-php-on-windows-7/">Install Apache web server on Windows 7 with php</a> appeared first on <a rel="nofollow" href="http://jackkozik.com">JackKozik.com</a>.</p> ]]></content:encoded> <wfw:commentRss>http://jackkozik.com/install-apache-httpd-and-php-on-windows-7/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Personal website now runs over https. Cheap SSL certificate from ClickSSL.</title><link>http://jackkozik.com/clickssl-for-a-cheap-certificate-http-https-for-my-personal-website/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=clickssl-for-a-cheap-certificate-http-https-for-my-personal-website</link> <comments>http://jackkozik.com/clickssl-for-a-cheap-certificate-http-https-for-my-personal-website/#comments</comments> <pubDate>Wed, 14 Nov 2012 20:05:59 +0000</pubDate> <dc:creator><![CDATA[Jack Kozik]]></dc:creator> <category><![CDATA[Web Programming]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[ClickSSL]]></category> <category><![CDATA[RapidSSL]]></category> <category><![CDATA[SSL Certificate]]></category><guid isPermaLink="false">http://jackkozik.com/?p=101</guid> <description><![CDATA[<p>I wrote a personal single page web application and decided to setup an SSL certificate and run it over https, not http.  I setup the web server and iptables to listen to port 443. But when I accessed my application using https, I got a bright red screen warning me of security certificate issues for [&#8230;]</p><p>The post <a rel="nofollow" href="http://jackkozik.com/clickssl-for-a-cheap-certificate-http-https-for-my-personal-website/">Personal website now runs over https. Cheap SSL certificate from ClickSSL.</a> appeared first on <a rel="nofollow" href="http://jackkozik.com">JackKozik.com</a>.</p> ]]></description> <content:encoded><![CDATA[<p>I wrote a personal single page web application and decided to setup an SSL certificate and run it over https, not http.  I setup the web server and iptables to listen to port 443. But when I accessed my application using https, I got a bright red screen warning me of security certificate issues for the web site.</p><div id="attachment_109" style="width: 310px" class="wp-caption alignnone"><a href="http://jackkozik.com/wp-content/uploads/2012/11/SSLCertfExpired.jpg"><img class="size-medium wp-image-109" title="SSLCertfExpired" src="http://jackkozik.com/wp-content/uploads/2012/11/SSLCertfExpired-300x138.jpg" alt="" width="300" height="138" /></a><p class="wp-caption-text">(click for larger view)</p></div><p>I guess I don&#8217;t really need to get a certificate.  All I have to do is click &#8220;proceed anyway&#8221; and everything would still work. My app would be running over the Internet encrypted.  I didn&#8217;t like the user experience; I wanted to be able to use my app from any browser, securely.  So I decided to research registering my URL for an SSL certificate.<span id="more-101"></span></p><p>I picked the reseller service called <a href="http://www.clickssl.com/">ClickSSL</a>. They sell all kinds of SSL certificates ranging from $11.95/yr upto $274/yr; there&#8217;s a range of services and security levels.  I picked their service called <a href="http://www.clickssl.com/ssl-certificates/rapidssl/rapidssl-certificate">RapidSSL</a>.  It was the cheapest and promised easy setup.  I learned that it&#8217;s building upon the GeoTrust branded SSL infrastructure.</p><h2>SSL Certificate Setup Process</h2><p>So I am not sure how much I want to restate right here, but the SSL setup process is complicated.  I had no idea what I was doing, so I totally followed the setup<a href="http://www.clickssl.com/ssl-certificates-information"> HOWTOs</a> found at the RapidSSL website.</p><p>The first step is running a tool on your server (I use Apache on Win7, tool name: genrsa).  The tool is used to generate a Private Key. I named the output file <em>my_domain_com.key. </em>The key files (excerpt only) looks sort of like this:</p><pre>-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAwUjy+PuNKKEcMyk0aRAzvRB4VRpJyHUhHGFxW4PVJwrTD7by
DlFsk1jYB5L6KRzv8pVv82jDax1gvb6TDk0Hiv9uLAynAno+MmoinXwVTatpClgN
...
-----END RSA PRIVATE KEY-----</pre><p>The next step is to create a Certificate Signing Request (CSR); I used a tool called openssl.  It used my key file from the previous step.  The CSR is your public key.  This is what is sent to GeoTrust; the Private Key is kept secure on your apache server.  The CSR tool generated file, I named it <em>my_domain_com.csr. </em>The CSR file contains:</p><pre>-----BEGIN CERTIFICATE REQUEST-----
MIICrDCCAZQCAQAwZzELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMRMw
EQYDVQQHEwpOYXBlcnZpbGxlMQ0wCwYDVQQKEwRzZWxmMSEwHwYDVQQDExhjaXNj
...
-----END CERTIFICATE REQUEST-----</pre><p>The next step in the process points you to the  SSL Certificate application webpage; it prompts you for a bunch of server information, including your fully qualified domain name and a credit card number.  It asks you to cut and paste your CSR (pubic key) into a web form. I submitted SSL application.</p><p>You get a web page asking  for an email address for from which a verification / authorization request can be mailed.    Note: this cannot be any email address, but it must be an administrator who sits on your FQDN.  For me, I picked admin@domain.com.  The SSL service sends an email with a link to a reply web page.  It will send you this email once a day for several days until you reply.  Once you reply, someone does some kind of manual check, and then a day or so later you get an email with your SSL certificate.</p><h2>The SSL certificate looks like this:</h2><pre>Your RapidSSL certificate:

-----BEGIN CERTIFICATE-----
MIIFNjCCBB6gAwIBAgIDCSa+MA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT
MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew
HhcNMTIxMTExMTEwMjI1WhcNMTMxMjE0MjA0OTAxWjCBxzEpMCcGA1UEBRMgdUlJ
aG5RNkdjeG52RnA4WjFYcFlFMTdnTFdHWkZiZTkxEzARBgNVBAsTCkdUMDgyMDY2
...
-----END CERTIFICATE-----</pre><p>This certificate is what you paid the money for.  You need to save it in a file (I named mine my_domain_com.crt).  The file needs to be installed into your Apache web server. Also, you will get a pointer to a Intermediate CA Bundle file.  This file (eg my_domain_com.ca-bundle); this file needs to be saved into your Apache web server, too.  I followed the RapidSSL Instructions titled: <a href="https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=content&amp;actp=CROSSLINK&amp;id=SO6252">Install certificate in Apache</a></p><p>There were a few updates that were need, but for me, the most important point was to remember the changes to the httpd-ssl.conf file:</p><pre>SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/my_domain_com.crt"
SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/my_domain_com.key"
SSLCertificateChainFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/my_domain_com.ca-bundle"</pre><p>&nbsp;</p><p>The post <a rel="nofollow" href="http://jackkozik.com/clickssl-for-a-cheap-certificate-http-https-for-my-personal-website/">Personal website now runs over https. Cheap SSL certificate from ClickSSL.</a> appeared first on <a rel="nofollow" href="http://jackkozik.com">JackKozik.com</a>.</p> ]]></content:encoded> <wfw:commentRss>http://jackkozik.com/clickssl-for-a-cheap-certificate-http-https-for-my-personal-website/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>