<?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>Danny Tsang &#187; apache</title> <atom:link href="http://www.dannytsang.co.uk/index.php/tag/apache/feed/" rel="self" type="application/rss+xml" /><link>http://www.dannytsang.co.uk</link> <description>Eats and spits code by day</description> <lastBuildDate>Mon, 06 Feb 2012 00:01:00 +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>Netstat By Port</title><link>http://www.dannytsang.co.uk/index.php/netstat-by-port/</link> <comments>http://www.dannytsang.co.uk/index.php/netstat-by-port/#comments</comments> <pubDate>Tue, 16 Aug 2011 23:03:18 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[bind]]></category> <category><![CDATA[netstat]]></category> <category><![CDATA[port]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=3886</guid> <description><![CDATA[netstat -tulpn&#124; grep :80 where 80 is the port number Apache Address already in use: make_sock: could not bind to port 80 or 443 error and solution Related posts: O2 Blocks Port 25 SSH On Multiple Ports Enabling Remote Access &#8230; <a
href="http://www.dannytsang.co.uk/index.php/netstat-by-port/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/o2-blocks-port-25/' rel='bookmark' title='O2 Blocks Port 25'>O2 Blocks Port 25</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/ssh-on-multiple-ports/' rel='bookmark' title='SSH On Multiple Ports'>SSH On Multiple Ports</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/enabling-remote-access-to-mysql/' rel='bookmark' title='Enabling Remote Access To MySQL'>Enabling Remote Access To MySQL</a></li></ol>]]></description> <content:encoded><![CDATA[<p><code><a
href="http://www.dannytsang.co.uk/index.php/tag/netstat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with netstat">netstat</a> -tulpn| grep :80</code> where 80 is the <a
href="http://www.dannytsang.co.uk/index.php/tag/port/" class="st_tag internal_tag" rel="tag" title="Posts tagged with port">port</a> number</p><p><a
href="http://www.cyberciti.biz/faq/apachehttpdaddress-already-in-use-make_sock-could-not-bind-to-port-80-or-443/" target="_blank">Apache Address already in use: make_sock: could not bind to port 80 or 443 error and solution</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/o2-blocks-port-25/' rel='bookmark' title='O2 Blocks Port 25'>O2 Blocks Port 25</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/ssh-on-multiple-ports/' rel='bookmark' title='SSH On Multiple Ports'>SSH On Multiple Ports</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/enabling-remote-access-to-mysql/' rel='bookmark' title='Enabling Remote Access To MySQL'>Enabling Remote Access To MySQL</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/netstat-by-port/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Website Optimizing Tools</title><link>http://www.dannytsang.co.uk/index.php/website-optimizing-tools/</link> <comments>http://www.dannytsang.co.uk/index.php/website-optimizing-tools/#comments</comments> <pubDate>Tue, 26 Jul 2011 23:01:10 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Website]]></category> <category><![CDATA[Analytics]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[Chrome]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[DreamHost]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[PageSpeed]]></category> <category><![CDATA[twitter]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=3552</guid> <description><![CDATA[Page load times are being taken into Google&#8217;s search result so it&#8217;s more important than ever to get your pages/site to load as quickly as possible in an efficient manner. This also benefits users and especially mobile browsers. Here are &#8230; <a
href="http://www.dannytsang.co.uk/index.php/website-optimizing-tools/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/page-speed-tests/' rel='bookmark' title='Page Speed Tests'>Page Speed Tests</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/website-test-environment/' rel='bookmark' title='Website Test Environment'>Website Test Environment</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/namebench-dns-tester/' rel='bookmark' title='namebench &#8211; DNS Tester'>namebench &#8211; DNS Tester</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Page load times are being taken into <a
href="http://www.dannytsang.co.uk/index.php/tag/google/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a>&#8217;s search result so it&#8217;s more important than ever to get your pages/site to load as quickly as possible in an efficient manner. This also benefits users and especially mobile browsers. Here are a few tools to help increase webpage improvements and tracking tools.</p><h3>Google Analytics</h3><p>This is a must have monitoring feature. All that is required is a Google account (with Analytics) and copying and pasting the code into your website. With modern CRMs, the code can be written once to a template and every time a page is severed, it will be included to track <a
href="http://www.dannytsang.co.uk/index.php/tag/web/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Web">web</a> statistics to all the pages using the same template. Analytics will help identify users and associated information such as the origin of the user, the OS and <a
href="http://www.dannytsang.co.uk/index.php/tag/browser/" class="st_tag internal_tag" rel="tag" title="Posts tagged with browser">browser</a> they are using and more. This really does give a good indication of who and what type of people visit your site and how many people over a given period. Go http://www.google.com/analytics/ and sign up for an account.</p><h3>Webpage Test</h3><p>Tests the loading times of a first view (no cached data) and repeat views (viewing with cached data). It gives a good indication of how and which parts are taking a long time to load. For example I found that the <a
href="http://www.dannytsang.co.uk/index.php/tag/twitter/" class="st_tag internal_tag" rel="tag" title="Posts tagged with twitter">Twitter</a> &#8220;widget&#8221; is the longest part to load but it queries <a
href="http://www.dannytsang.co.uk/index.php/tag/twitter/" class="st_tag internal_tag" rel="tag" title="Posts tagged with twitter">Twitter</a>&#8217;s website to get the last tweet I made. There is nothing I can do to improve that except for removing it. Webpage Test also breaks down into details how long each external elements takes to load which includes external javascript and <a
href="http://www.dannytsang.co.uk/index.php/tag/css/" class="st_tag internal_tag" rel="tag" title="Posts tagged with CSS">CSS</a> files, images and iframes. Webpage test is very easy to use and it can be found at http://www.webpagetest.org At least one speed test should be performed to test page load times but there are other tools around which give different information and different types of load tests.</p><h3>mod_pagespeed</h3><p>PageSpeed is a Google made <a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a> module which increases page load times by changing a few things on the <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a> side before it is sent to the client/browser. These include minifying files to adding expiration and caching settings. The nature of the module means it needs to be installed on the <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a> side or the hosting provider needs to support it for example <a
href="http://www.dannytsang.co.uk/index.php/tag/dreamhost/" class="st_tag internal_tag" rel="tag" title="Posts tagged with DreamHost">DreamHost</a>. Enabling the module, dannytsang.co.uk went from a loading time of 13 seconds to 8 seconds using <a
href="http://www.dannytsang.co.uk/index.php/tag/chrome/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Chrome">Chrome</a> and with a clean cache. PageSpeed takes out a lot of manual Apache configuration settings out and does it automatically. The module is open source and can be found at http://pagespeed.googlelabs.com</p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/page-speed-tests/' rel='bookmark' title='Page Speed Tests'>Page Speed Tests</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/website-test-environment/' rel='bookmark' title='Website Test Environment'>Website Test Environment</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/namebench-dns-tester/' rel='bookmark' title='namebench &#8211; DNS Tester'>namebench &#8211; DNS Tester</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/website-optimizing-tools/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Apache 2 Hardening Tips</title><link>http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/</link> <comments>http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/#comments</comments> <pubDate>Sat, 25 Jun 2011 23:01:31 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[DDOS]]></category> <category><![CDATA[server]]></category> <category><![CDATA[Ubuntu]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=3594</guid> <description><![CDATA[Below are some of the tricks I use or found useful to try to mitigate unwanted attention. Whilst this is not a definitive guide these are simple quick things that can be done. This was written for Ubuntu but it &#8230; <a
href="http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/ubuntu-10-04-firewall-ufw-basics/' rel='bookmark' title='Ubuntu 10.04 Firewall (UFW) Basics'>Ubuntu 10.04 Firewall (UFW) Basics</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/setting-up-cups-print-server-on-ubuntu-804/' rel='bookmark' title='Setting Up CUPS (Print Server) On Ubuntu 8.04'>Setting Up CUPS (Print Server) On Ubuntu 8.04</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Below are some of the tricks I use or found useful to try to mitigate unwanted attention. Whilst this is not a definitive guide these are simple quick things that can be done. This was written for <a
href="http://www.dannytsang.co.uk/index.php/tag/ubuntu/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Ubuntu">Ubuntu</a> but it can be applied to any OS running Apache 2.</p><h3>Disable Directory Listings</h3><p>First directive to change is to stop people browsing through files when a user types in a <a
href="http://www.dannytsang.co.uk/index.php/tag/web/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Web">web</a> address which leads to a folder.</p><p>Edit the file <code>/etc/apache2/sites-available/default</code><br
/> changing default for the site config file.<br
/> <code>$ sudo service apache2 restart</code><br
/> Find <strong>Indexes</strong> from the options under the Directory directive and add a subtract sign to disable the option. For example:<br
/> <code>&lt;Directory /var/www/&gt;<br
/> Options Indexes FollowSymLinks MultiViews<br
/> <a
href="http://www.dannytsang.co.uk/index.php/tag/allowoverride/" class="st_tag internal_tag" rel="tag" title="Posts tagged with AllowOverride">AllowOverride</a> None<br
/> Order allow,deny<br
/> allow from all<br
/> &lt;/Directory&gt;</code><br
/> Becomes<br
/> <code>&lt;Directory /var/www/&gt;<br
/> Options -Indexes FollowSymLinks MultiViews<br
/> AllowOverride None<br
/> Order allow,deny<br
/> allow from all<br
/> &lt;/Directory&gt;</code></p><h3>mod-evasive</h3><p>As a last measure from a <a
href="http://www.dannytsang.co.uk/index.php/tag/ddos/" class="st_tag internal_tag" rel="tag" title="Posts tagged with DDOS">DDOS</a> attach, Apache has a module which black lists IP addresses temporarily. The default rules are:</p><blockquote><ol><li>Requesting the same page more than a few times per second</li><li>Making more than 50 concurrent requests on the same child per second</li><li>Making any requests while temporarily blacklisted (on a blocking list)</li></ol></blockquote><p><code>$sudo apt-get install libapache2-mod-evasive</code></p><h3>mod-<a
href="http://www.dannytsang.co.uk/index.php/tag/security/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Security">security</a></h3><p>Helps stop some injection and <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">Server</a> Side Includes (SSI) attacks:<br
/> <code>$sudo apt-get install libapache2-mod-security2</code></p><h3>Remove Server Signature &#038; Information</h3><p>Turn off server information such as version of Apache and HTTP header server information.</p><p><code>$vi /etc/apache2/conf.d/security</code></p><p>Find the following and change the values to <strong>Prod</strong> and <strong>Off</strong><br
/> ServerTokens Prod<br
/> ServerSignature Off</p><h3>Update Apache</h3><p>Keep the software as up to date as possible. New version come out all the time with various fixes and security patches. Fortunately, Debian based systems such as Ubuntu makes this really easy:<br
/> <code>$sudo apt-get update &#038;&#038; sudo apt-get dist-upgrade</code></p><p>Last thing to do is to restart the server for the changes to take hold. Any mis-configuration should be reported when the server tries to start back up. It might be easier to restart after each change to make troubleshooting easier.</p><p>Below are some use case specific ways to enhance security. If the below changes breaks a site then revert the changes but for most home uses they can generally be turned off.</p><h3>Disable SSI</h3><p>Add a minus sign in front of <strong>Includes</strong>. E.g:<br
/> <code>&lt;Directory /var/www/&gt;<br
/> Options -Indexes -Includes FollowSymLinks MultiViews<br
/> AllowOverride None<br
/> Order allow,deny<br
/> allow from all<br
/> &lt;/Directory&gt;</code></p><h3>Disable CGI</h3><p>Add / modify <strong>ExecCGI</strong> in the directory directive:<br
/> <code>&lt;Directory /var/www/&gt;<br
/> Options -Indexes -Includes -ExecCGI FollowSymLinks MultiViews<br
/> AllowOverride None<br
/> Order allow,deny<br
/> allow from all<br
/> &lt;/Directory&gt;</code></p><h3>Disable Symbolic Links</h3><p>Remove / add a hyphen to <strong>FollowSymLinks</strong> to disable sym links (like shorts in Windows terms):<br
/> <code>&lt;Directory /var/www/&gt;<br
/> Options -Indexes -Includes -ExecCGI -FollowSymLinks MultiViews<br
/> AllowOverride None<br
/> Order allow,deny<br
/> allow from all<br
/> &lt;/Directory&gt;</code></p><h3>Disable All Options</h3><p>To remove all options above just remove all the options and add the word <strong>None</strong><br
/> <code>&lt;Directory /var/www/&gt;<br
/> Options None<br
/> AllowOverride None<br
/> Order allow,deny<br
/> allow from all<br
/> &lt;/Directory&gt;</code></p><p><a
href="http://secure-ubuntu-server.blogspot.com/2009/07/howto-hardening-your-apache-and-php-on_07.html" target="_blank">Almost Secure and Perfect Ubuntu Server</a></p><p><a
href="http://httpd.apache.org/docs/2.0/misc/security_tips.html" target="_blank">Security Tips</a></p><p><a
href="http://www.petefreitag.com/item/505.cfm" target="_blank">20 ways to Secure your Apache Configuration</a></p><p><a
href="http://gliderservices.no-ip.org/blog/?p=9" target="_blank">How to harden Ubuntu 10.04 LTS + LAMP</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/ubuntu-10-04-firewall-ufw-basics/' rel='bookmark' title='Ubuntu 10.04 Firewall (UFW) Basics'>Ubuntu 10.04 Firewall (UFW) Basics</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/setting-up-cups-print-server-on-ubuntu-804/' rel='bookmark' title='Setting Up CUPS (Print Server) On Ubuntu 8.04'>Setting Up CUPS (Print Server) On Ubuntu 8.04</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Invalid Command &#8216;Header&#8217;</title><link>http://www.dannytsang.co.uk/index.php/invalid-command-header/</link> <comments>http://www.dannytsang.co.uk/index.php/invalid-command-header/#comments</comments> <pubDate>Tue, 21 Jun 2011 16:11:06 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[Ubuntu]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=3737</guid> <description><![CDATA[Another error and same problem as last time: the module was not loaded! Invalid command &#8216;Header&#8217;, perhaps misspelled or defined by a module not included in the server configuration $sudo a2enmod headers to enable the headers module $sudo service apache2 &#8230; <a
href="http://www.dannytsang.co.uk/index.php/invalid-command-header/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/invalid-command-expiresactive/' rel='bookmark' title='Invalid Command &#8216;ExpiresActive&#8217;'>Invalid Command &#8216;ExpiresActive&#8217;</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-twitter-tools-shows-blank-page-on-connect/' rel='bookmark' title='WordPress Twitter Tools Shows Blank Page On Connect'>WordPress Twitter Tools Shows Blank Page On Connect</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Another error and same problem as last time: the module was not loaded!</p><blockquote><p>Invalid command &#8216;Header&#8217;, perhaps misspelled or defined by a module not included in the <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a> configuration</p></blockquote><p><code>$sudo a2enmod headers</code> to enable the headers module</p><p><code>$sudo service <a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>2 restart</code> to restart the server for the module to take effect.</p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/invalid-command-expiresactive/' rel='bookmark' title='Invalid Command &#8216;ExpiresActive&#8217;'>Invalid Command &#8216;ExpiresActive&#8217;</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-twitter-tools-shows-blank-page-on-connect/' rel='bookmark' title='WordPress Twitter Tools Shows Blank Page On Connect'>WordPress Twitter Tools Shows Blank Page On Connect</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/invalid-command-header/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Invalid Command &#8216;ExpiresActive&#8217;</title><link>http://www.dannytsang.co.uk/index.php/invalid-command-expiresactive/</link> <comments>http://www.dannytsang.co.uk/index.php/invalid-command-expiresactive/#comments</comments> <pubDate>Tue, 21 Jun 2011 16:10:08 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[ExpiresActive]]></category> <category><![CDATA[Ubuntu]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=3734</guid> <description><![CDATA[I recently got the error message below when I was trying to reload Apache: Invalid command &#8216;ExpiresActive&#8217;, perhaps misspelled or defined by a module not included in the server configuration &#8230;fail! To fix it ensure the &#8220;expires&#8221; module is loaded: &#8230; <a
href="http://www.dannytsang.co.uk/index.php/invalid-command-expiresactive/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/invalid-command-header/' rel='bookmark' title='Invalid Command &#8216;Header&#8217;'>Invalid Command &#8216;Header&#8217;</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/' rel='bookmark' title='Apache 2 Hardening Tips'>Apache 2 Hardening Tips</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I recently got the error message below when I was trying to reload <a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>:</p><blockquote><p>Invalid command &#8216;<a
href="http://www.dannytsang.co.uk/index.php/tag/expiresactive/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ExpiresActive">ExpiresActive</a>&#8217;, perhaps misspelled or defined by a module not included in the <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a> configuration<br
/> &#8230;fail!</p></blockquote><p>To fix it ensure the &#8220;expires&#8221; module is loaded:<br
/> <code>$sudo a2enmod expires</code></p><p>Then restart Apache server<br
/> <code>$sudo service apache2 restart</code></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/invalid-command-header/' rel='bookmark' title='Invalid Command &#8216;Header&#8217;'>Invalid Command &#8216;Header&#8217;</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/' rel='bookmark' title='Apache 2 Hardening Tips'>Apache 2 Hardening Tips</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/invalid-command-expiresactive/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>energy@home 0.5.2 Released</title><link>http://www.dannytsang.co.uk/index.php/energyhome-0-5-2-released/</link> <comments>http://www.dannytsang.co.uk/index.php/energyhome-0-5-2-released/#comments</comments> <pubDate>Tue, 19 Apr 2011 09:45:27 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[energy@home]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[API]]></category> <category><![CDATA[energyathome]]></category> <category><![CDATA[flot]]></category> <category><![CDATA[JQuery]]></category> <category><![CDATA[JSON]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=3465</guid> <description><![CDATA[A minor release but fixes the issue where Apache was reporting an error due to a missing variable. The new version also contains more changes &#8220;under the hood&#8221; such as using JSON natively during GET operations (graph data) and clean &#8230; <a
href="http://www.dannytsang.co.uk/index.php/energyhome-0-5-2-released/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-6-5-released/' rel='bookmark' title='Energy@Home 0.6.5 Released'>Energy@Home 0.6.5 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-6-released/' rel='bookmark' title='energy@home 0.6 Released'>energy@home 0.6 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-5-released/' rel='bookmark' title='energy@home 0.5 Released'>energy@home 0.5 Released</a></li></ol>]]></description> <content:encoded><![CDATA[<p>A minor release but fixes the issue where <a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a> was reporting an <a
href="http://code.google.com/p/energyathome/issues/detail?id=5&#038;can=1" target="_blank">error due to a missing variable.</a> The new version also contains more changes &#8220;under the hood&#8221; such as using <a
href="http://www.dannytsang.co.uk/index.php/tag/json/" class="st_tag internal_tag" rel="tag" title="Posts tagged with JSON">JSON</a> natively during GET operations (graph data) and clean up of directory structure.</p><p>My next intentions for <a
href="http://www.dannytsang.co.uk/index.php/tag/energyhome/" class="st_tag internal_tag" rel="tag" title="Posts tagged with energy@home">energy@home</a> include:</p><ul><li>Move <a
href="http://www.dannytsang.co.uk/index.php/tag/flot/" class="st_tag internal_tag" rel="tag" title="Posts tagged with flot">flot</a> library from 0.6 to 0.7 (Already done but requires <a
href="http://code.google.com/p/energyathome/issues/detail?id=8" target="_blank">API changes</a>)</li><li>Move to <a
href="http://www.dannytsang.co.uk/index.php/tag/jquery/" class="st_tag internal_tag" rel="tag" title="Posts tagged with JQuery">JQuery</a> UI 1.8.11 (Already implemented in trunk)</li></ul><p>The above will be another minor release because there are no new functions included.</p><p><a
href="http://code.google.com/p/energyathome/" target="_blank">http://code.google.com/p/energyathome/</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-6-5-released/' rel='bookmark' title='Energy@Home 0.6.5 Released'>Energy@Home 0.6.5 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-6-released/' rel='bookmark' title='energy@home 0.6 Released'>energy@home 0.6 Released</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-0-5-released/' rel='bookmark' title='energy@home 0.5 Released'>energy@home 0.5 Released</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/energyhome-0-5-2-released/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Create And Enable SSL On Ubuntu LAMP Server</title><link>http://www.dannytsang.co.uk/index.php/create-and-enable-ssl-on-ubuntu-lamp-server/</link> <comments>http://www.dannytsang.co.uk/index.php/create-and-enable-ssl-on-ubuntu-lamp-server/#comments</comments> <pubDate>Tue, 22 Mar 2011 00:01:00 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Website]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[apache ssl]]></category> <category><![CDATA[crt]]></category> <category><![CDATA[CSR]]></category> <category><![CDATA[HTTPS]]></category> <category><![CDATA[ssl]]></category> <category><![CDATA[ssl certificate]]></category> <category><![CDATA[VirtualHost]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=3373</guid> <description><![CDATA[Introduction SSL is used to encrypt data between the client e.g a user viewing a website to the web server which hosts the site. SSL uses certificates which are signed and verify the validity of a website. Like any vendor &#8230; <a
href="http://www.dannytsang.co.uk/index.php/create-and-enable-ssl-on-ubuntu-lamp-server/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/enable-sftp-on-vsftpd-in-ubuntu/' rel='bookmark' title='Enable SFTP On VSFTPD In Ubuntu'>Enable SFTP On VSFTPD In Ubuntu</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/awstats/' rel='bookmark' title='Awstats'>Awstats</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/' rel='bookmark' title='Apache 2 Hardening Tips'>Apache 2 Hardening Tips</a></li></ol>]]></description> <content:encoded><![CDATA[<h3>Introduction</h3><p>SSL is used to encrypt data between the client e.g a user viewing a website to the web server which hosts the site. SSL uses certificates which are signed and verify the validity of a website. Like any vendor based system the certificate is as secure as the issuer. This means anyone can generate an SSL certificate but only &#8220;certified vendors&#8221; are considered safe.</p><h3>Pre-requisites</h3><p>This post assumes Apache 2 is installed on Ubuntu 10.04 (other versions may apply) with no issues. The default virtual host will be used as the example.</p><h3>Install SSL</h3><ol><li>Ensure the SSL mod is installed so Apache can handle SSL requests <code>sudo apt-get install ssl-cert</code></li><li>Enable the SSL module <code>sudo a2enmod ssl</code></li><li>Before restarting the service, edit <code>/etc/apache2/<a
href="http://www.dannytsang.co.uk/index.php/tag/ports/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ports">ports</a>.conf</code> and make sure there is a <strong>Listen 443</strong> in the file. Alternatively add it in and if the entry is invalid apache won&#8217;t start.</li><li>Create a directory to store the SSL certificates <code>sudo mkdir /etc/apache2/ssl</code></li><li>Restart apache service <code>sudo service apache2 restart</code></li></ol><h3>Generate SSL Certificate</h3><blockquote><p>Only run steps in this section if the certificate to be used is not going to be issued by a vendor.</p></blockquote><ol><li>Create the certificate in the <a
href="http://www.dannytsang.co.uk/index.php/tag/apache-ssl/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache ssl">Apache SSL</a> directory <code>sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/www.dannytsang.com.<a
href="http://www.dannytsang.co.uk/index.php/tag/crt/" class="st_tag internal_tag" rel="tag" title="Posts tagged with crt">crt</a></code></li></ol><p>Once complete go to <a
href="#VirtualHost">Configure Apache 2</a></p><h3>Applying For SSL</h3><p>The steps may vary but this is what I had to go through to obtain an SSL certificate:</p><ol><li>Install OpenSSL <code>sudo apt-get install openssl</code></li><li>Generate a RSA private key. Enter a <a
href="http://www.dannytsang.co.uk/index.php/tag/password/" class="st_tag internal_tag" rel="tag" title="Posts tagged with password">password</a> when prompted <code>openssl genrsa -des3 -out www.dannytsang.com.key 2048</code></li><li>Create the <a
href="http://www.dannytsang.co.uk/index.php/tag/csr/" class="st_tag internal_tag" rel="tag" title="Posts tagged with CSR">CSR</a> <code>openssl req -new -key www.dannytsang.com.key -out www.dannytsang.com.csr</code> Example information:<ul><li>Country Name (2 letter code) [AU]:GB</li><li>State or Province Name (full name) [Some-State]:Hertfordshire</li><li>Locality Name (eg, city) []:Stevenage</li><li>Organization Name (eg, company) [GX Networks Ltd]:Danny Tsang</li><li>Organizational Unit Name (eg, section) []:</li><li>Common Name (eg, YOUR name) []:www.dannytsang.com</li><li>Leave the rest blank</li></ul></li><li>Ensure the CSR details are correct <code>openssl req -noout -text -in www.dannytsang.com.csr</code> If not go through the steps above again to re-generate the CSR</li><li>Submit the CSR to the vendor.</li><li>The vendor will verify details submitted before issuing the SSL certificate. Once that is complete continue to the next stage.</li><p>Depending on the level of the SSL certificate applied there is always at least 2 certificates that have to be included in Apache. One is the Vendor who signs the SSL and the SSL certificate itself.</p><li>Copy the vendor certificate to <code>sudo mkdir /etc/apache2/ssl</code>. For example <code>sudo vi /etc/apache2/ssl/CaCert.pem</code></li><li>Copy the site / domain SSL certificate <code>sudo vi /etc/apache2/ssl/www.dannytsang.com.crt</code></li></ol><h3><a
name="VirtualHost">Configure Apache 2</a></h3><p>There are various ways to enable HTTPS on a website. The options described below are the ones discussed in this article:</p><ul><li>Site Wide &#8211; The whole site uses HTTPS so that all the traffic is encrypted. This is the most secure method. Some limitations with this include any &#8220;resources&#8221; displayed on the site not from a HTTPS site will show a warning to the user. Website traffic will still be encrypted but not for non HTTPS parts e.g Ads</li><li>Login / Accounts only &#8211; From user log in and onwards will be encrypted. Other parts are not.</li></ul><p>For Login / Accounts only part, <a
href="http://www.dannytsang.co.uk/index.php/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with WordPress">WordPress</a> will be used as the example.</p><p>For both options there should be 2 virtual hosts configured in Apache. One for non encrypted and the other for encrypted. If the desired effect is for the user to explicitly type https into the browser then only the secure virtual host is need. Otherwise a redirect will be created so that users entering http://www.dannytsang.com will automatically go to https://www.dannytsang.com. The following will assume the virtual host file have already been created and working. The virtual host file will be called dannytsang.</p><ol><li>Make a copy of the virtual host which will be used for the SSL part of the site <code>sudo cp /etc/apache2/sites-available/dannytsang /etc/apache2/sites-available/dannytsangssl</code></li><li>Edit the secure virtual host file and make the following changes:<ul><li>Change the <a
href="http://www.dannytsang.co.uk/index.php/tag/port/" class="st_tag internal_tag" rel="tag" title="Posts tagged with port">port</a> to 443, the default <a
href="http://www.dannytsang.co.uk/index.php/tag/port/" class="st_tag internal_tag" rel="tag" title="Posts tagged with port">port</a> for HTTPS traffic e.g &lt;<a
href="http://www.dannytsang.co.uk/index.php/tag/virtualhost/" class="st_tag internal_tag" rel="tag" title="Posts tagged with VirtualHost">VirtualHost</a> *:443&gt;</li><li>ServerName &#8211; Ensure this directive is set to the same as the SSL certificate e.g ServerName www.dannytsang.com</li><li>SSLEngine &#8211; Turn SSL on e.g SSLEngine On</li><li>SSLCACertificateFile &#8211; Path to the vendor or &#8220;Certificate Authority&#8221; signing certificate. This may be optional and not required if it was not mentioned by the issuer e.g SSLCACertificateFile /etc/apache2/ssl/CaCert.pem</li><li>SSLCertificateChainFile &#8211; Intermediate CA. Same as above e.g SSLCertificateChainFile /etc/apache2/ssl/ICaCert.pem</li><li>SSLCertificateFile  &#8211; Path to site SSL e.g SSLCertificateFile /etc/apache2/ssl/www.dannytsang.com.crt</li><li>SSLCertificateKeyFile &#8211; The file path to the private key used to sign the CSR e.g SSLCertificateKeyFile /etc/apache2/ssl/www.dannytsang.com.key</li><li>Save and exit the file</li></ul></li></ol><p>Example of the secure virtual host configuration file so far:</p><blockquote><p> &lt;VirtualHost *:443&gt;<br
/> ServerName www.dannytsang.com</p><p> SSLEngine On<br
/> SSLCertificateChainFile /etc/apache2/ssl/ICaCert.pem<br
/> SSLCertificateFile /etc/apache2/ssl/www.dannytsang.com.crt<br
/> SSLCertificateKeyFile /etc/apache2/ssl/www.dannytsang.com.key</p><p> DocumentRoot /var/www/dannytsang</p><p>&lt;/VirtualHost&gt;</p></blockquote><p>Note that my example does not contain <strong>SSLCACertificateFile</strong>. For a self generated SSL the only <strong>SSLCertificateFile</strong> is needed.</p><h4>Site Wide HTTPS</h4><p>One of the pit falls of site wide encryption is that all content must reside on the https domain or from other https sources. Below is an example of what <a
href="http://www.dannytsang.co.uk/index.php/tag/google/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a>&#8217;s Chrome browser would show if content didn&#8217;t come from a secured resource. In my case it was Ads:<br
/> <a
href="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/https-non-secure-content.png" rel="lightbox[3373]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/https-non-secure-content-150x150.png" alt="" title="https non secure content" width="150" height="150" class="aligncenter size-thumbnail wp-image-3408" /></a></p><ol><li>Edit the non secure virtual host file of the site <code>sudo vi /etc/apache2/sites-available/dannytsang</code></li><li>Add the following lines below the SSL related directives:<br
/> <code><br
/> &lt;IfModule mod_rewrite.c&gt;<br
/> RewriteEngine on<br
/> RewriteCond %{SERVER_PORT} !^443$<br
/> RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]<br
/> &lt;/IfModule&gt;<br
/> </code></li><li>Save and exit the virtual host file.</li><li>Enable the new secure virtual host <code>sudo a2ensite dannytsangssl</code></li><li>Restart Apache <code>sudo service apache2 restart</code></li></ol><h4>Login HTTPS For WordPress</h4><ol><li>Edit the non secure virtual host file <code>sudo vi /etc/apache2/sites-available/dannytsang</code></li><li>Add the following inside the &lt;Directory /var/www/dannytsang&gt;:<br
/> <code><br
/> &lt;Directory /var/www/dannytsang&gt;<br
/> &lt;IfModule mod_rewrite.c&gt;<br
/> RewriteEngine On<br
/> RewriteBase /<br
/> RewriteCond %{REQUEST_FILENAME} -f [OR]<br
/> RewriteCond %{REQUEST_FILENAME} -d<br
/> RewriteRule ^wp-(admin|login|register)(.*) https://%{SERVER_NAME}/wp-$1$2 [L]<br
/> &lt;/IfModule&gt;<br
/> &lt;/Directory&gt;<br
/> </code><br
/> The RewriteRule is the rule for when it would change the URL to https. In this case it looks for any of the following combinations after the domain wp-admin, wp-login, wp-register e.g www.dannytsang.com/wp-login.<a
href="http://www.dannytsang.co.uk/index.php/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a>. Multiple rules may be added to match all sorts of sub directories.</li><li>Save and exit the virtual host file.</li><li>Add the following line to the non secure site so that going from a login / admin page to the normal part of the site e.g logging out and going back to the front page will change it to non https<br
/> <code>vi /etc/apache2/sites-available/dannytsang</code><br
/> <code><br
/> &lt;Directory /var/www/dannytsang&gt;<br
/> &lt;IfModule mod_rewrite.c&gt;<br
/> RewriteEngine On<br
/> RewriteBase /<br
/> RewriteRule !^wp-(admin|login|register)(.*) - [C]<br
/> RewriteRule ^(.*)$ http://%{SERVER_NAME}/$1 [L]<br
/> &lt;/IfModule&gt;<br
/> &lt;/Directory&gt;<br
/> </code></li><li>Save and exit the virtual host file.</li><li>Enable mod_rewrite in Apache <code>sudo a2enmod rewrite</code></li><li>Enable the new secure virtual host <code>sudo a2ensite dannytsangssl</code></li><li>Restart Apache <code>sudo service apache2 restart</code></li><li>Edit the WordPress config file (wp-config.php) and add the following line to the bottom of the file <code>define('FORCE_SSL_ADMIN', true);</code></ol><h3>Debugging Tools &#038; Methods</h3><p>I found Google Chrome to be the best browser to troubleshoot SSL problems. Chrome is the most promient in showing HTTPS problems (see non secure sources screenshot above). The problem with Chrome was that it was more strict on showing the &#8220;padlock&#8221; HTTPS icon.<br
/> <a
href="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/https-cross.png" rel="lightbox[3373]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/https-cross-150x94.png" alt="" title="https cross" width="150" height="94" class="aligncenter size-thumbnail wp-image-3424" /></a><br
/> Go to the Console in Chrome (Ctrl+Shift+j > Console tab) lists insure content warnings.<br
/> <a
href="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/insure-content.png" rel="lightbox[3373]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/insure-content-150x150.png" alt="" title="insure content" width="150" height="150" class="aligncenter size-thumbnail wp-image-3425" /></a></p><h3>Summary</h3><p>Whilst going through this setup process myself it has been a long and arduous process (even if it doesn&#8217;t look it from this write up). I have learnt:</p><ul><li>Check the Certificate Authority &#8211; Ensure it is from a reputable organization issuing / signing the SSL. SSL providers are not necessarily the company which signs them. Also cheap SSLs may be signed by an unknown / not recognised as a verified CA. This list of CA vary from browser to browser.</li><li>Non secure SSL &#8211; Even if a page or site is encrypted using the HTTPS protocol, the page is not deemed secure if any information on a page comes from a non secure site.</li><li>Check WordPress <a
href="http://www.dannytsang.co.uk/index.php/tag/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with plugins">Plugins</a> &#8211; Some <a
href="http://www.dannytsang.co.uk/index.php/tag/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with plugins">plugins</a> are not HTTPS aware for example lightbox2.</li><li>Clear Cookies &#038; Cache &#8211; Sometimes browsers cache information and so even restarting the webserver may still result in an unsecure page / site. I found the best practice was to close the browser and start it up again. A quicker way to do it is to clear the cache and cookies associated with the site.</li></ul> <a
href='http://www.dannytsang.co.uk/index.php/create-and-enable-ssl-on-ubuntu-lamp-server/https-non-secure-content/' title='https non secure content'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/https-non-secure-content-150x150.png" class="attachment-thumbnail" alt="https non secure content" title="https non secure content" /></a> <a
href='http://www.dannytsang.co.uk/index.php/create-and-enable-ssl-on-ubuntu-lamp-server/https-cross/' title='https cross'><img
width="150" height="94" src="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/https-cross-150x94.png" class="attachment-thumbnail" alt="https cross" title="https cross" /></a> <a
href='http://www.dannytsang.co.uk/index.php/create-and-enable-ssl-on-ubuntu-lamp-server/insure-content/' title='insure content'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2011/03/insure-content-150x150.png" class="attachment-thumbnail" alt="insure content" title="insure content" /></a><p><a
href="https://help.ubuntu.com/community/forum/server/apache2/SSL" target="_blank">forumserverapache2SSL<br
/> </a></p><p><a
href="http://www.123-support.co.uk/support/answers/generate-a-csr-apache-open-ssl-634/" target="_blank">Generate a CSR: Apache (Open SSL)</a></p><p><a
href="http://codex.wordpress.org/Administration_Over_SSL" target="_blank">WordPress Administration Over SSL</a></p><p><a
href="http://ubuntuforums.org/showthread.php?t=895633"  target="_blank">apache2 &#8211; redirect http to https</a></p><p><a
href="https://search.thawte.com/support/ssl-digital-certificates/index?page=content&#038;actp=CROSSLINK&#038;id=SO15464" target="_blank">Intermediate Certificate Authority (CA) &#038; SSL Installation Instructions for Apache</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/enable-sftp-on-vsftpd-in-ubuntu/' rel='bookmark' title='Enable SFTP On VSFTPD In Ubuntu'>Enable SFTP On VSFTPD In Ubuntu</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/awstats/' rel='bookmark' title='Awstats'>Awstats</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/' rel='bookmark' title='Apache 2 Hardening Tips'>Apache 2 Hardening Tips</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/create-and-enable-ssl-on-ubuntu-lamp-server/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>WordPress Twitter Tools Shows Blank Page On Connect</title><link>http://www.dannytsang.co.uk/index.php/wordpress-twitter-tools-shows-blank-page-on-connect/</link> <comments>http://www.dannytsang.co.uk/index.php/wordpress-twitter-tools-shows-blank-page-on-connect/#comments</comments> <pubDate>Tue, 16 Nov 2010 05:57:25 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[API]]></category> <category><![CDATA[cURL]]></category> <category><![CDATA[oauth]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[twitter]]></category> <category><![CDATA[WordPress]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=3056</guid> <description><![CDATA[Overview I use the Twitter Tools plugin on WordPress to tweet my blog posts as well as showing my Tweets in my side bar. The recent change to oAuth and disabling basic authentication by Twitter has made the process slightly &#8230; <a
href="http://www.dannytsang.co.uk/index.php/wordpress-twitter-tools-shows-blank-page-on-connect/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-twitter-integration/' rel='bookmark' title='energy@home Twitter Integration'>energy@home Twitter Integration</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/invalid-command-expiresactive/' rel='bookmark' title='Invalid Command &#8216;ExpiresActive&#8217;'>Invalid Command &#8216;ExpiresActive&#8217;</a></li></ol>]]></description> <content:encoded><![CDATA[<h3>Overview</h3><p>I use the <a
href="http://www.dannytsang.co.uk/index.php/tag/twitter/" class="st_tag internal_tag" rel="tag" title="Posts tagged with twitter">Twitter</a> Tools plugin on <a
href="http://www.dannytsang.co.uk/index.php/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with WordPress">WordPress</a> to tweet my blog posts as well as showing my Tweets in my side bar. The recent change to <a
href="http://www.dannytsang.co.uk/index.php/tag/oauth/" class="st_tag internal_tag" rel="tag" title="Posts tagged with oauth">oAuth</a> and disabling basic authentication by Twitter has made the process slightly more cumbersome to get working. Having said that the Twitter Tools settings page does a good job of guiding users to setting it up correctly.</p><p>The problem I had was that it wasn&#8217;t getting the <a
href="http://www.dannytsang.co.uk/index.php/tag/api/" class="st_tag internal_tag" rel="tag" title="Posts tagged with API">API</a> keys but at the end where it says <strong>Connect to Twitter</strong> After pressing it a blank page would show.</p><h3>Solution &#8211; <a
href="http://www.dannytsang.co.uk/index.php/tag/curl/" class="st_tag internal_tag" rel="tag" title="Posts tagged with cURL">cURL</a></h3><p>Install <a
href="http://www.dannytsang.co.uk/index.php/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">PHP</a> cURL. This is very simple:<br
/> <code>sudo apt-get install php5-curl</code><br
/> Enable the plugin in <a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a> and reload it to make the changes take affect:<br
/> <code>sudo a2enmod php-curl</code><br
/> <code>sudo service apache2 reload</code> or for older versions:<br
/> <code>sudo /etc/init.d/apache2 reload</code></p><p><a
href="http://wphelpcenter.com/plugins/twitter-tools/" target="_blank"><br
/> Twitter Tools Support</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/energyhome-twitter-integration/' rel='bookmark' title='energy@home Twitter Integration'>energy@home Twitter Integration</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/invalid-command-expiresactive/' rel='bookmark' title='Invalid Command &#8216;ExpiresActive&#8217;'>Invalid Command &#8216;ExpiresActive&#8217;</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/wordpress-twitter-tools-shows-blank-page-on-connect/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MediaTomb DLNA To Playstation 3</title><link>http://www.dannytsang.co.uk/index.php/mediatomb-dlna-to-playstation-3/</link> <comments>http://www.dannytsang.co.uk/index.php/mediatomb-dlna-to-playstation-3/#comments</comments> <pubDate>Mon, 08 Feb 2010 00:01:19 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[divx]]></category> <category><![CDATA[DLNA]]></category> <category><![CDATA[MediaTomb]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[myth]]></category> <category><![CDATA[MythTV]]></category> <category><![CDATA[Playstation]]></category> <category><![CDATA[Sony]]></category> <category><![CDATA[sony playstation]]></category> <category><![CDATA[sony playstation 3]]></category> <category><![CDATA[SQLite]]></category> <category><![CDATA[UPNP]]></category> <category><![CDATA[upnp server]]></category> <category><![CDATA[XML]]></category> <category><![CDATA[XviD]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2566</guid> <description><![CDATA[Overview I found the Video plugin for MythTV 0.21 to be inadequate for streaming to the Sony Playstation 3. It didn&#8217;t update fast enough when you dropped a video into the UPnP directory and also there was no external way &#8230; <a
href="http://www.dannytsang.co.uk/index.php/mediatomb-dlna-to-playstation-3/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/full-disk-mediatomb-hog/' rel='bookmark' title='Full Disk &#8211; MediaTomb Hog'>Full Disk &#8211; MediaTomb Hog</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/' rel='bookmark' title='Ubuntu Music Streaming Server &#8211; Ampache'>Ubuntu Music Streaming Server &#8211; Ampache</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/all-things-digital-interview/' rel='bookmark' title='All Things Digital Interview'>All Things Digital Interview</a></li></ol>]]></description> <content:encoded><![CDATA[<h3>Overview</h3><p>I found the Video plugin for <a
href="http://www.dannytsang.co.uk/index.php/tag/mythtv/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MythTV">MythTV</a> 0.21 to be inadequate for streaming to the Sony Playstation 3. It didn&#8217;t update fast enough when you dropped a video into the UPnP directory and also there was no external way of telling it to refresh it&#8217;s list of files without starting up <a
href="http://www.dannytsang.co.uk/index.php/tag/myth/" class="st_tag internal_tag" rel="tag" title="Posts tagged with myth">Myth</a> Frontend.</p><h3><a
href="http://www.dannytsang.co.uk/index.php/tag/mediatomb/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MediaTomb">MediaTomb</a></h3><p>MediaTomb is a UPnP server which can run as a standalone or as a daemon. It uses an <a
href="http://www.dannytsang.co.uk/index.php/tag/xml/" class="st_tag internal_tag" rel="tag" title="Posts tagged with XML">XML</a> configuration file for it&#8217;s settings (pretty neat stuff) and is pretty small in size. The software comes with it&#8217;s own <a
href="http://www.dannytsang.co.uk/index.php/tag/web/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Web">web</a> server so you don&#8217;t have to install a full apache install to get to the control panel and it uses <a
href="http://www.dannytsang.co.uk/index.php/tag/sqlite/" class="st_tag internal_tag" rel="tag" title="Posts tagged with SQLite">SQLite</a> by default so no big database backend to be installed.</p><h3>Install &#038; Configure MediaTomb</h3><p>Install MediaTomb and ffmeg thumbnailer<br
/> <code>sudo apt-get install mediatomb ffmpegthumbnailer</code><br
/> That&#8217;s it for the install!</p><p>edit the file config file in <strong>/etc/mediatomb/config.xml</strong> and change the following settings:</p><p>Enable PS3 support change this:</p><blockquote><p>&lt;protocolInfo extend=&#8221;no&#8221;/&gt;&lt;!&#8211; For PS3 support change to &#8220;yes&#8221; &#8211;&gt;</p></blockquote><p>to</p><blockquote><p>&lt;protocolInfo extend=&#8221;yes&#8221;/>&lt;!&#8211; For PS3 support change to &#8220;yes&#8221; &#8211;&gt;</p></blockquote><p>and also</p><blockquote><p>&lt;!&#8211; &lt;map from=&#8221;avi&#8221; to=&#8221;video/divx&#8221;/&gt; &#8211;&gt;</p></blockquote><p>to</p><blockquote><p>&lt;map from=&#8221;avi&#8221; to=&#8221;video/divx&#8221;/&gt;</p></blockquote><p>Add the line<br
/> <code>&lt;pc-directory upnp-hide="yes"/&gt;</code><br
/> below<br
/> <code>&lt;webroot&gt;/usr/share/mediatomb/web&lt;/webroot&gt;</code><br
/> so that it looks like this<br
/> <code>&lt;webroot&gt;/usr/share/mediatomb/web&lt;/webroot&gt;<br
/> &lt;pc-directory upnp-hide="yes"/&gt;</code><br
/> This hides the full directory path from the Playstation so it can only view the directories added and not the full system.</p><p>Add the following to enable thumbnail previews. I have found this does not work 100% of the time.</p><p>Enable transcoding<br
/> <code>&lt;transcoding enabled="no"&gt;</code><br
/> to<br
/> <code>&lt;transcoding enabled="yes"&gt;</code></p><p>Add the following transcode mappings under <strong>&lt;mimetype-profile-mappings&gt;</strong> tag:</p><blockquote><p>&lt;transcode mimetype=&#8221;video/divx&#8221; using=&#8221;video-thumbnail&#8221;/&gt;<br
/> &lt;transcode mimetype=&#8221;video/mpeg&#8221; using=&#8221;video-thumbnail&#8221;/&gt;<br
/> &lt;transcode mimetype=&#8221;video/mp4&#8243; using=&#8221;video-thumbnail&#8221;/&gt;<br
/> &lt;transcode mimetype=&#8221;video/x-ms-wmv&#8221; using=&#8221;video-thumbnail&#8221;/&gt;</p></blockquote><p>Add the following settings between the <strong>&lt;profiles&gt;&lt;/profiles&gt;</strong> elements. Not the parent is plural and each profile is singular.</p><blockquote><p>&lt;profile name=&#8221;video-thumbnail&#8221; enabled=&#8221;yes&#8221; type=&#8221;external&#8221;&gt;<br
/> &lt;mimetype&gt;image/jpeg&lt;/mimetype&gt;<br
/> &lt;accept-url&gt;yes&lt;/accept-url&gt;<br
/> &lt;thumbnail&gt;yes&lt;/thumbnail&gt;<br
/> &lt;resolution&gt;128&#215;128&lt;/resolution&gt;<br
/> &lt;agent command=&#8221;/usr/bin/ffmpegthumbnailer&#8221; arguments=&#8221;-i %in -o %out -s 128&#8243;/&gt;<br
/> &lt;buffer size=&#8221;524288&#8243; chunk-size=&#8221;512&#8243; fill-size=&#8221;1024&#8243;/&gt;<br
/> &lt;/profile&gt;</p></blockquote><p>Restart MediaTomb service <code>sudo /etc/init.d/mediatomb restart</code> If it fails to restart then double check the config file for errors.</p><p>Go to the machine in a web <a
href="http://www.dannytsang.co.uk/index.php/tag/browser/" class="st_tag internal_tag" rel="tag" title="Posts tagged with browser">browser</a> on port 49152 e.g http://localhost:49152</p><div
align="center"><a
href="http://www.dannytsang.co.uk/wp-content/uploads/2010/02/MediaTomb-Adding-directory.png" rel="lightbox[2566]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2010/02/MediaTomb-Adding-directory-150x150.png" alt="" title="MediaTomb Adding directories" width="150" height="150" class="aligncenter size-thumbnail wp-image-2588" /></a></div><p>On this web page configures the directories available over UPnP. The Database section shows what directories are visible / registered to MediaTomb and Filesystem shows the computer directories that can be added for DLNA / UPnP visibility. When a directory is added MediaTomb scans the directory and register them so they show up on the Playstation. These can include music, videos and pictures.</p><div
align="center"><a
href="http://www.dannytsang.co.uk/wp-content/uploads/2010/02/MediaTomb-Update-Frequency.png" rel="lightbox[2566]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2010/02/MediaTomb-Update-Frequency-150x150.png" alt="" title="MediaTomb Update Frequency" width="150" height="150" class="aligncenter size-thumbnail wp-image-2663" /></a></div><p>In the top right hand corner there is a plus &#8220;+&#8221; with two arrows around it. Clicking on it loads a new page in the main window, replacing the file lists in the directory. This is the page for setting how often it scans for changes.</p><p>Go to the Playstation, turn it on and go to the relevant category e.g photo in the menu. There should be a MediaTomb server in the list. If it does not appear go towards the top and scan for more media servers to look for MediaTomb.</p><h3>Summary</h3><p>The software is pretty self contained but I would have liked the option to use Apache and MySQL because those are already installed on my system.</p><p>MediaTomb does the job for now and whilst I cannot get the thumbnails to work on all the media it still does a brillant job of streaming the media to the Playstation. Unfortunately it&#8217;s not integrated into MythTV so records will still have to be done via MythTV but this is not a problem because all recorded TV shows are registered in the database.</p><p>A problem I did encounter was that I added multiple directories but reguardless of where they reside on the computer, all videos appear in one directory on the Playstation. I&#8217;m not  sure if this is a bug or how it&#8217;s suppose to work.</p><p><a
href="http://ubuntuforums.org/showthread.php?t=650020&#038;page=5" target="_blank">[HOWTO]:Stream DivX/XviD to a PS3 with firmware 2.10 using MediaTomb and Ubuntu 7</a></p> <a
href='http://www.dannytsang.co.uk/index.php/mediatomb-dlna-to-playstation-3/mediatomb-adding-directory/' title='MediaTomb Adding directories'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2010/02/MediaTomb-Adding-directory-150x150.png" class="attachment-thumbnail" alt="MediaTomb Adding directories" title="MediaTomb Adding directories" /></a> <a
href='http://www.dannytsang.co.uk/index.php/mediatomb-dlna-to-playstation-3/mediatomb-update-frequency/' title='MediaTomb Update Frequency'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2010/02/MediaTomb-Update-Frequency-150x150.png" class="attachment-thumbnail" alt="MediaTomb Update Frequency" title="MediaTomb Update Frequency" /></a><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/full-disk-mediatomb-hog/' rel='bookmark' title='Full Disk &#8211; MediaTomb Hog'>Full Disk &#8211; MediaTomb Hog</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/' rel='bookmark' title='Ubuntu Music Streaming Server &#8211; Ampache'>Ubuntu Music Streaming Server &#8211; Ampache</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/all-things-digital-interview/' rel='bookmark' title='All Things Digital Interview'>All Things Digital Interview</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/mediatomb-dlna-to-playstation-3/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>WordPress Incorrect Username / Password With VSFTP</title><link>http://www.dannytsang.co.uk/index.php/wordpress-incorrect-username-password-with-vsftp/</link> <comments>http://www.dannytsang.co.uk/index.php/wordpress-incorrect-username-password-with-vsftp/#comments</comments> <pubDate>Mon, 11 Jan 2010 20:25:44 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Website]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[password]]></category> <category><![CDATA[username]]></category> <category><![CDATA[VSFTP]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2513</guid> <description><![CDATA[I was getting an error logging into my FTP/SFTP server via WordPress when I tried to upgrade a plugin or two. It was saying the username / password was incorrect yet I was able to log in using an FTP &#8230; <a
href="http://www.dannytsang.co.uk/index.php/wordpress-incorrect-username-password-with-vsftp/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-twitter-tools-shows-blank-page-on-connect/' rel='bookmark' title='WordPress Twitter Tools Shows Blank Page On Connect'>WordPress Twitter Tools Shows Blank Page On Connect</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/spa3102-username-and-password/' rel='bookmark' title='SPA3102 Username And Password'>SPA3102 Username And Password</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I was getting an error logging into my FTP/<a
href="http://www.dannytsang.co.uk/index.php/tag/sftp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with SFTP">SFTP</a> <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a> via <a
href="http://www.dannytsang.co.uk/index.php/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with WordPress">WordPress</a> when I tried to upgrade a plugin or two. It was saying the <a
href="http://www.dannytsang.co.uk/index.php/tag/username/" class="st_tag internal_tag" rel="tag" title="Posts tagged with username">username</a> / <a
href="http://www.dannytsang.co.uk/index.php/tag/password/" class="st_tag internal_tag" rel="tag" title="Posts tagged with password">password</a> was incorrect yet I was able to log in using an FTP client.</p><p>I checked all my config settings for both <a
href="http://www.dannytsang.co.uk/index.php/tag/vsftp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with VSFTP">VSFTP</a> and <a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a> but ended up restarting both services which made it work. I did not see any errors in <a
href="http://www.dannytsang.co.uk/index.php/tag/vsftp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with VSFTP">VSFTP</a> logs and no relevant entries in Apache. One those strange occurrences I guess.</p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/' rel='bookmark' title='WordPress Permalink Change Error'>WordPress Permalink Change Error</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-twitter-tools-shows-blank-page-on-connect/' rel='bookmark' title='WordPress Twitter Tools Shows Blank Page On Connect'>WordPress Twitter Tools Shows Blank Page On Connect</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/spa3102-username-and-password/' rel='bookmark' title='SPA3102 Username And Password'>SPA3102 Username And Password</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/wordpress-incorrect-username-password-with-vsftp/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MythWeb Database Access Denied</title><link>http://www.dannytsang.co.uk/index.php/mythweb-database-access-denied/</link> <comments>http://www.dannytsang.co.uk/index.php/mythweb-database-access-denied/#comments</comments> <pubDate>Sun, 20 Sep 2009 23:01:20 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[database]]></category> <category><![CDATA[database access]]></category> <category><![CDATA[MythWeb]]></category> <category><![CDATA[password]]></category> <category><![CDATA[setenv]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2289</guid> <description><![CDATA[I recently had to re-install my Linux computer after a lot had screwed up (mainly my fault for experimenting with stuff). When I check MythWeb I got the Message &#8220;MythWeb Database Access Denied&#8221; with some more text below. MythWeb is &#8230; <a
href="http://www.dannytsang.co.uk/index.php/mythweb-database-access-denied/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/enabling-remote-access-to-mysql/' rel='bookmark' title='Enabling Remote Access To MySQL'>Enabling Remote Access To MySQL</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/subversion-on-ubuntu-710/' rel='bookmark' title='Subversion on Ubuntu 7.10'>Subversion on Ubuntu 7.10</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/mythweb-preview/' rel='bookmark' title='MythWeb Preview'>MythWeb Preview</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I recently had to re-install my <a
href="http://www.dannytsang.co.uk/index.php/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a> computer after a lot had screwed up (mainly my fault for experimenting with stuff).</p><div
align="center"><a
href="http://www.dannytsang.co.uk/wp-content/uploads/2009/09/Database-Access-Denied.png" rel="lightbox[2289]"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/09/Database-Access-Denied-150x150.png" alt="Database Access Denied" title="Database Access Denied" width="150" height="150" class="aligncenter size-thumbnail wp-image-2290" /></a></div><p>When I check <a
href="http://www.dannytsang.co.uk/index.php/tag/mythweb/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MythWeb">MythWeb</a> I got the Message &#8220;<a
href="http://www.dannytsang.co.uk/index.php/tag/mythweb/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MythWeb">MythWeb</a> <a
href="http://www.dannytsang.co.uk/index.php/tag/database/" class="st_tag internal_tag" rel="tag" title="Posts tagged with database">Database</a> Access Denied&#8221; with some more text below. MythWeb is very important to me and the reason was the <a
href="http://www.dannytsang.co.uk/index.php/tag/web/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Web">web</a> config had the initial password which I changed for my install. Edit the file <code>/etc/<a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>2/sites-enabled/mythweb.conf</code> and find the line &#8220;<a
href="http://www.dannytsang.co.uk/index.php/tag/setenv/" class="st_tag internal_tag" rel="tag" title="Posts tagged with setenv">setenv</a> db_password&#8221; and change the text after to the correct password. Save and close the file and restart Apache <code>sudo /etc/init.d/apache2 restart</code></p><p><a
href="http://ubuntuforums.org/showthread.php?t=704337" target="_blank">8.04 &#8211; Mythweb database access denied Forum Post</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/enabling-remote-access-to-mysql/' rel='bookmark' title='Enabling Remote Access To MySQL'>Enabling Remote Access To MySQL</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/subversion-on-ubuntu-710/' rel='bookmark' title='Subversion on Ubuntu 7.10'>Subversion on Ubuntu 7.10</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/mythweb-preview/' rel='bookmark' title='MythWeb Preview'>MythWeb Preview</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/mythweb-database-access-denied/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Ubuntu Music Streaming Server &#8211; Ampache</title><link>http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/</link> <comments>http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/#comments</comments> <pubDate>Tue, 21 Jul 2009 23:01:11 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Music]]></category> <category><![CDATA[album art]]></category> <category><![CDATA[ampache]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[buffer]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[gnump3d]]></category> <category><![CDATA[music collection]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[perl]]></category> <category><![CDATA[plugins]]></category> <category><![CDATA[server]]></category> <category><![CDATA[shoutcast]]></category> <category><![CDATA[stream]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[windows media player]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=2207</guid> <description><![CDATA[Overview I wanted a music server for personal use so that I can access my music collection remotely or locally. A web front end with the ability to stream to various players would be key. It had to run on &#8230; <a
href="http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/music-live-more-or-less/' rel='bookmark' title='Music Live (More Or Less)'>Music Live (More Or Less)</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/mythweb-preview/' rel='bookmark' title='MythWeb Preview'>MythWeb Preview</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/sennheiser-hd555/' rel='bookmark' title='Sennheiser HD555'>Sennheiser HD555</a></li></ol>]]></description> <content:encoded><![CDATA[<h3>Overview</h3><p>I wanted a <a
href="http://www.dannytsang.co.uk/index.php/tag/music/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Music">music</a> server for personal use so that I can access my <a
href="http://www.dannytsang.co.uk/index.php/tag/music/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Music">music</a> collection remotely or locally. A <a
href="http://www.dannytsang.co.uk/index.php/tag/web/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Web">web</a> front end with the ability to stream to various players would be key. It had to run on my Ubuntu system.</p><p>I do not / this article does not condone the use for piracy in any way.</p><h3><a
href="http://www.gnu.org/software/gnump3d/" target="_blank">GNUMP3d</a></h3><p><a
href="http://www.gnu.org/software/gnump3d/" target="_blank">GNUMP3d</a> is a GNU music server. It is in the Ubuntu 8.04 repository and includes it&#8217;s own light weight server (good and bad points to this method). It&#8217;s all self contained so it does not require Apache or a database installed to run it.</p><p>The web front end is very basic with only text on the web page but has the ability to record statistics. Being a basic music server it does not support album art but it does have a lot of themes built in. All settings are changed in the config file but cannot be changed using the web front end. This means starting up SSH to even change a small setting like your chosen theme.</p><p>It runs on any system which has perl installed. The problem I had with this set up was the lack of user authentication. It had a &#8220;weak&#8221; and basic method of using a .<a
href="http://www.dannytsang.co.uk/index.php/tag/password/" class="st_tag internal_tag" rel="tag" title="Posts tagged with password">password</a> file which can be placed in the root of the music directory but this support was removed in the new version because it was &#8220;weak&#8221;. I do not want my server to be publicly accessible (that&#8217;s just asking for trouble). I went ahead and removed it.</p><h3><a
href="http://ampache.org/" target="_blank">Ampache</a></h3><p><a
href="http://ampache.org/" target="_blank">Ampache</a> has more weight to it than <a
href="http://www.gnu.org/software/gnump3d/" target="_blank">GNUMP3d</a>. It requires a web server, <a
href="http://www.dannytsang.co.uk/index.php/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">PHP</a> and <a
href="http://www.dannytsang.co.uk/index.php/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mysql">MySQL</a> (Not tried it with any other database). It supports tags and album art, There is also an option for lyrics but I have yet to see this in action.</p><p>The music server has many options including different playlist formats:</p><li>M3U</li><li>M3U Simple</li><li>PLS</li><li>ASX</li><li>RAM</li><li>XSPF</li><p>And also different streaming formats like <a
href="http://www.dannytsang.co.uk/index.php/tag/shoutcast/" class="st_tag internal_tag" rel="tag" title="Posts tagged with shoutcast">shoutcast</a> as well as different playback methods. The best part about <a
href="http://ampache.org/" target="_blank">Ampache</a> is the built in flash player. Just like the BBC Radio player it opens a new window with the player and controls.</p><p>The web front end allows you to create and modify playlists, upload, download, and find duplicate music files. <a
href="http://ampache.org/" target="_blank">Ampache</a> has built in access control level (ACL) which is basic but it works.</p><p>There are only 2 themes included and last.fm plugin. The non default theme is &#8220;pretty&#8221; but I find the font to be too small and there is no way of changing it. It has statistics and recently played songs which are bonus features.</p><h3>Pre-Requisite To <a
href="http://ampache.org/" target="_blank">Ampache</a></h3><p>Install Apache and MySQL if not already done so:<br
/> <code>sudo apt-get install apache mysql</code><br
/> When prompted, enter the root password.</p><p>Ensure Apache is up and running by typing <code>http://localhost</code> in a web browser. A message saying &#8220;It works!&#8221; should appear.</p><blockquote><p> Optional:<br
/> Install MySQL Administrator to easily maintain the MySQL database:<br
/> <code>sudo apt-get install mysql-admin</code></p></blockquote><p>The following steps are beyond the scope of this how to:<br
/> Connect to the database using your root account (using MySQL Admin).</p><p>Create a username and password for <a
href="http://ampache.org/" target="_blank">Ampache</a> as well as a schema. For remained of this post I will user the username=<a
href="http://ampache.org/" target="_blank">Ampache</a> and password=password using the database schema <a
href="http://ampache.org/" target="_blank">Ampache</a>.</p><p>Ensure the <a
href="http://ampache.org/" target="_blank">Ampache</a> database user has all <a
href="http://www.dannytsang.co.uk/index.php/tag/privileges/" class="st_tag internal_tag" rel="tag" title="Posts tagged with privileges">privileges</a> to the <a
href="http://ampache.org/" target="_blank">Ampache</a> schema.</p><h3>Install <a
href="http://ampache.org/" target="_blank">Ampache</a></h3><p>Download the latest <a
href="http://ampache.org/" target="_blank">Ampache</a> from <a
href="http://ampache.org/" target="_blank">Ampache</a>.org/&#8221;>http://<a
href="http://ampache.org/" target="_blank">Ampache</a>.org/</a> In my case it was 3.5.1<br
/> <code>wget http://<a
href="http://ampache.org/" target="_blank"><a
href="http://www.dannytsang.co.uk/index.php/tag/ampache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ampache">Ampache</a></a>.org/downloads/<a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1.tar.gz</code></p><p>Extract the compressed files:<br
/> <code>tar -xzvf <a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1.tar.gz</code></p><p>Move (and rename) the directory <a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1 to the web directory (by default in /var/www). Depending on where you want to access <a
href="http://ampache.org/" target="_blank">Ampache</a> will depend on where you move the directory. Do <strong>ONE</strong> of the following:</p><blockquote><p> For <a
href="http://ampache.org/" target="_blank">Ampache</a> to appear in the &#8220;root&#8221; directory e.g http://www.dannytsang.co.uk move all the files in <a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1 to /var/www:<br
/> <code>cd <a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1</code><br
/> <code>sudo mv * /var/www</code></p></blockquote><blockquote><p> For <a
href="http://ampache.org/" target="_blank">Ampache</a> to appear in the sub directory e.g http://www.dannytsang.co.uk/<a
href="http://ampache.org/" target="_blank">Ampache</a> move all the files in <a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1 to /var/www:<br
/> <code>sudo mv <a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1 /var/www/<a
href="http://ampache.org/" target="_blank">Ampache</a></code></p></blockquote><p>Ensure you have got your <a
href="http://ampache.org/" target="_blank">Ampache</a> files in the place you want to access them. I had to re-install it because I kept the directory as <a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1 which made it http://www.dannytsang.co.uk/<a
href="http://ampache.org/" target="_blank">Ampache</a>-3.5.1/<br
/> To re-install I have to remove the file <code>/etc/apache/config.d/<a
href="http://ampache.org/" target="_blank">Ampache</a></code> and go back to the beginning to copying the file.</p><p>Next step is to ensure the file permissions are set correctly. For method one:<br
/> <code>sudo chmod -R 774 /var/www</code></p><p>For method two:<br
/> <code>sudo chmod -R 774 /var/www/<a
href="http://ampache.org/" target="_blank">Ampache</a></code><br
/> <code>sudo chown -R root:www-data /var/www/<a
href="http://ampache.org/" target="_blank">Ampache</a></code></p><p>Head over to http://localhost or http://www.localhost/<a
href="http://ampache.org/" target="_blank">Ampache</a> and follow the on screen instructions to install <a
href="http://ampache.org/" target="_blank">Ampache</a>.</p><h3>Post Install</h3><p>Everything else can be configured from the web interface with the exception of the music directory. Where ever you want to add music to <a
href="http://ampache.org/" target="_blank">Ampache</a>, you have to make sure it has at least xx4 (read) file permission otherwise the Apache / <a
href="http://ampache.org/" target="_blank">Ampache</a> will not be able to see the file. If you want to allow <a
href="http://ampache.org/" target="_blank">Ampache</a> to manage files e.g upload new music files to your library you will need to give it write access too. The best way to deal with this is to add www-data to your username group. Either way I do not recommend allowing write access for security reasons.</p><h3>Review</h3><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Ampache-Login-Page-150x150.jpg" alt="Ampache Login Page" title="Ampache Login Page" width="150" height="150" class="aligncenter size-thumbnail wp-image-2218" /></div><p>I intend on using the server whilst I&#8217;m not at home e.g abroad or at work. I can listen to all my collection without carrying it around with me and now my iPhone has more juice. I only use my iPhone to listen to music when I&#8217;m not in the office or listen to podcasts.</p><p>The reason why I won&#8217;t use it for podcasts is because it doesn&#8217;t have speed playback and no bookmarking feature which allows you to resume from where you left off.</p><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Flash-Player-150x150.jpg" alt="Flash Player" title="Flash Player" width="150" height="150" class="aligncenter size-thumbnail wp-image-2210" /></div><p>The Flash player was usable. It showed a dark grey buffering bar and a light grey bar for the currently playing track. A good visual of how much has been downloaded from the stream. All the tracks for the current play list is shown along with the album art cover (nice touch).</p><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/WMP-Player-150x150.png" alt="WMP Player" title="WMP Player" width="150" height="150" class="aligncenter size-thumbnail wp-image-2211" /></div><p>M3U streaming to Windows Media Player (WMP) worked very well. It too showed the album art and this method I could use the media keys on the computer.</p><p>Both players had reasonably good quality but the flash player lacked settings to adjust the buffer rate. The problem with both methods was the buffering. Not only did it need to buffer for each track but it had to re-buffer if a song has already played &#8211; something common to streaming media except for QuickTime.</p><p>WMP did lack the track titles until it got to the track itself. All it shows is index in the play list for the track if it hadn&#8217;t gotten to it yet.</p><p>I suffered a lot of pauses from the flash player because it had to buffer a lot through random moments through the day. However, WMP also had it&#8217;s buffering problems too but I could set the buffer limits to cope. When this happens I had to turn to the player to see what was going on, distracting me from work.</p><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Ampache-Track-List-150x150.jpg" alt="Ampache Track List" title="Ampache Track List" width="150" height="150" class="aligncenter size-thumbnail wp-image-2222" /></div><p>Playlists can be a powerful tool but in this case it&#8217;s pretty simply use. There is a current playlist which you add you tracks to. You can save this list determinately as one playlist which adds a date time stamp and your username. <del
datetime="2009-07-23T18:58:00+00:00">You cannot rename it to something more useful</del>. The current playlist can be formed of multiple store playlists as well as adhoc tracks.</p><p>Ampache supports tags and track ratings. Ratings can be changed online too. It includes the usual filtering and sort of tracks by artists and albums as well as search.</p><p>Adding libraries are fairly easy. You give it a directory path and it will index the given path. Libraries may exist locally or remotely. Options to update, clean, etc will automate management of songs.</p><div
align="center"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Ampache-ACL-150x150.jpg" alt="Ampache ACL" title="Ampache ACL" width="150" height="150" class="aligncenter size-thumbnail wp-image-2216" /></div><p>Working with Ampache User Access Control Level (ACL) was easy but may be too simple for power users. It has a drop down of all available groups for a given feature. The bad part is it assumes that any group above the selected group also has access to that feature. I believe it does not allow you to add new groups either.</p><h3>Summary</h3><p><a
href="http://ampache.org/" target="_blank">Ampache</a> is a good but media server. As always the user interface could be tweaked and a lot more plugins and features can be added e.g HTML 5 player, uPNP but that&#8217;s like asking for the world. The set up was very easily to do and does all the basics I want.</p><p><a
href="http://www.gnu.org/software/gnump3d/" target="_blank"><a
href="http://www.dannytsang.co.uk/index.php/tag/gnump3d/" class="st_tag internal_tag" rel="tag" title="Posts tagged with gnump3d">GNUMP3d</a> Website</a></p><p><a
href="http://ampache.org/" target="_blank">Ampache Website</a></p> <a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/flash-player/' title='Flash Player'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Flash-Player-150x150.jpg" class="attachment-thumbnail" alt="Flash Player" title="Flash Player" /></a> <a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/wmp-player/' title='WMP Player'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/WMP-Player-150x150.png" class="attachment-thumbnail" alt="WMP Player" title="WMP Player" /></a> <a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/ampache-acl/' title='Ampache ACL'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Ampache-ACL-150x150.jpg" class="attachment-thumbnail" alt="Ampache ACL" title="Ampache ACL" /></a> <a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/ampache-front-page/' title='Ampache Front Page'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Ampache-Front-Page-150x150.jpg" class="attachment-thumbnail" alt="Ampache Front Page" title="Ampache Front Page" /></a> <a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/ampache-login-page/' title='Ampache Login Page'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Ampache-Login-Page-150x150.jpg" class="attachment-thumbnail" alt="Ampache Login Page" title="Ampache Login Page" /></a> <a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/ampache-statistics/' title='Ampache Statistics'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Ampache-Statistics-150x150.jpg" class="attachment-thumbnail" alt="Ampache Statistics" title="Ampache Statistics" /></a> <a
href='http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/ampache-track-list/' title='Ampache Track List'><img
width="150" height="150" src="http://www.dannytsang.co.uk/wp-content/uploads/2009/07/Ampache-Track-List-150x150.jpg" class="attachment-thumbnail" alt="Ampache Track List" title="Ampache Track List" /></a><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/music-live-more-or-less/' rel='bookmark' title='Music Live (More Or Less)'>Music Live (More Or Less)</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/mythweb-preview/' rel='bookmark' title='MythWeb Preview'>MythWeb Preview</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/sennheiser-hd555/' rel='bookmark' title='Sennheiser HD555'>Sennheiser HD555</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/ubuntu-music-streaming-server-ampache/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>VPS Hosting With CheapVPS</title><link>http://www.dannytsang.co.uk/index.php/vps-hosting-with-cheapvps/</link> <comments>http://www.dannytsang.co.uk/index.php/vps-hosting-with-cheapvps/#comments</comments> <pubDate>Fri, 26 Dec 2008 12:00:54 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Website]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[bandwidth]]></category> <category><![CDATA[burstable]]></category> <category><![CDATA[hypervm]]></category> <category><![CDATA[lamp]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[linux distributions]]></category> <category><![CDATA[openvz]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[VPS]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=1642</guid> <description><![CDATA[Overview During the past couple of months I have noticed my site ( as well as other things) have been going down unexpectedly. The server running at home was getting on now (first purchased in 1997 as a desktop PC &#8230; <a
href="http://www.dannytsang.co.uk/index.php/vps-hosting-with-cheapvps/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/bash-man-command-not-found/' rel='bookmark' title='bash: man: command not found'>bash: man: command not found</a></li></ol>]]></description> <content:encoded><![CDATA[<h3>Overview</h3><p>During the past couple of months I have noticed my site ( as well as other things) have been going down unexpectedly. The <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a> running at home was getting on now (first purchased in 1997 as a desktop PC and changed to a headless <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a> in 2002/2003) and it has held up very well in the past. The time has come to off load some of the services it provides.</p><h3>Decision For <a
href="http://www.dannytsang.co.uk/index.php/tag/vps/" class="st_tag internal_tag" rel="tag" title="Posts tagged with VPS">VPS</a></h3><p>I decided to move the <a
href="http://www.dannytsang.co.uk/index.php/tag/lamp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with lamp">LAMP</a> stack (well the AMP part of it) to a VPS as an interim solution till I can fix or solve my availability issue with the server. The website was the most separate part of the server and does not need to be local with in the network (unlike CUPS which provides the network printer access). I went on the recommendation of <a
href="http://tweston.co.uk" target="_blank">Toby Weston</a> and went with <a
href="http://cheapvps.co.uk/" target="_blank">CheapVPS</a>. They were fairly cheap and used various technology like HyperVM and <a
href="http://www.dannytsang.co.uk/index.php/tag/openvz/" class="st_tag internal_tag" rel="tag" title="Posts tagged with openvz">OpenVZ</a> which were mentioned in <a
href="http://tllts.org/mirror.php?fname=tllts_278-12-17-08.mp3">TLLTS podcast episode 278</a>. Since the VPS was going to be a temporary solution till I got things sorted out I went with the cheapest option which gave me the following specs:</p><ul><li>128MB RAM burstable to 256MB</li><li>2.4GHz processor</li><li>10GB HDD space</li><li>150GB <a
href="http://www.dannytsang.co.uk/index.php/tag/bandwidth/" class="st_tag internal_tag" rel="tag" title="Posts tagged with bandwidth">bandwidth</a> per month</li></ul><p>I thought the above specs would be fine because the server it was running on now wasn&#8217;t that much more than what they were offering with the exception of RAM which had 192MB (1x128MB + 1x64mb). There were a variety of <a
href="http://www.dannytsang.co.uk/index.php/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a> distributions on offer too.</p><h3>Ordering From <a
href="http://cheapvps.co.uk/" target="_blank">CheapVPS</a></h3><p>I went ahead and filled out an order form for a VPS. I requested the lowest plan (as quoted above) and wanted <a
href="http://www.dannytsang.co.uk/index.php/tag/ubuntu/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Ubuntu">Ubuntu</a> 8.04 on it.</p><p>After submitting the order I realised how manual the process was going to be. I got an automated mail saying my order was to be processed and have to wait for another email to confirm / pay for the VPS. Why couldn&#8217;t I pay for it with the order request? Not long after I submitted my order I had to wait for the VPS to be set up. This part took the longest. From the time I submitted the order till when I got the email to say it was set up took almost 24 hours. One thing I noticed was how the web interface to the virtual machine uses a different login user name to the account for paying off invoices.</p><h3>Set Up &#038; Install</h3><div
align="center"><div
id="attachment_1664" class="wp-caption alignnone" style="width: 281px"><img
src="http://www.dannytsang.co.uk/wp-content/uploads/2008/12/cheapvps-271x300.jpg" alt="HyperVM On CheapVPS" title="HyperVM On CheapVPS" width="271" height="300" class="size-medium wp-image-1664" /><p
class="wp-caption-text">HyperVM On CheapVPS</p></div></div><p>I went ahead and set up some repositories (it only had one in the source file) and proceeded to install my LAMP stack. I was impressed with the minimalistic install they had installed. It barely took up 500mb let alone the 10GB quota I had. This did have it&#8217;s draw backs. It lacked almost everything but the bare essential software. It didn&#8217;t even have wget but it did have bash, vi and apt-get. The install was fairly easy with apt-get install. My first problem was <a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a> 2. Every time I started the service it would bomb out. A check at the logs showed it couldn&#8217;t create worker threads. A quick <a
href="http://www.dannytsang.co.uk/index.php/tag/google/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a> and help from <a
href="http://www.tweston.co.uk" target="_blank">Toby</a> got this problem solved by installing a lightweight module using the command:<br
/> <code>apt-get install apache2-mpm-prefork</code><br
/> MPM prefork replaced the multi threaded process management with a single thread style used in Apache 1.3.</p><p>Once that was done I went on to install PHP 5 and it&#8217;s related Apache module. PHP did not give me any trouble. The last thing in the LAMP set up was <a
href="http://www.dannytsang.co.uk/index.php/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mysql">MySQL</a>. This proved to be a bit of challenge because after it had installed and started things started to get noticeably slower.</p><p><a
href="http://cheapvps.co.uk/" target="_blank">CheapVPS</a> uses <a
href="http://lxlabs.com/software/hypervm/" target="_blank">HyperVM</a> to manage your VPS. It showed that my RAM had shot way above what I was allocated. Even with MySQL service stopped, Apache still took over 124MB of RAM. This was not good. Another round of Googling ensued and found that MySQL provides different configuration files to reduce the memory usage.<br
/> I made a backup of the normal my.cnf file and moved a copy of the cnf.small to <code>/etc/mysql</code>. After starting the service I kept an eye on the memory usage. It increased it over my 128MB but less than 256MB burstable. I did not want to run it in this state and have <a
href="http://cheapvps.co.uk/" target="_blank">CheapVPS</a> on my case that I was constantly using more than what I paid for so I requested to upgrade my plan to the next one up which allowed me to have 256MB and 512MB burst RAM. This revelation was shocking and makes me wonder how my old server handled it for all these years.</p><p>The upgrade did not cause me to lose my current set up. It was painless but yet another manual process.</p><p>Through my set up I did rebuild the VPS when I encountered the problem with Apache. The rebuild was very impressive. It had rebuilt my VM within less than a minute before it was up and running again.</p><h3>Speed &#038; Bandwidth</h3><p>The VPS has fairly fast connections and is hosted in UK (with US as a selectable option as well). I have noticed slow downs in my VM and think I may need to keep watching it for when this happens. I did have everything set up before but it was not rendering the website very well and none of the pictures were loading. A reboot later and it was fine.</p><h3>Plan &#038; Pricing</h3><p>I believe the plans offered are reasonable for their price. I&#8217;d like to be able to spec up my own VM like what you can do with building a custom computer with Dell and adjust the price of the plan accordingly. <a
href="http://cheapvps.co.uk/" target="_blank">CheapVPS</a> do offer discounts for purchasing longer term and the management of payment for the VMs is very easy to do with their web interface.</p><h3><a
href="http://cheapvps.co.uk/" target="_blank">CheapVPS</a> Ticketing System</h3><p>For all communication to <a
href="http://cheapvps.co.uk/" target="_blank">CheapVPS</a> it is done via their ticketing system. This is a nice way of capturing all enquires because you can see previous messages and it was asynchronous. I did not like the way the order had to be processed through this system considering Amazon has an automated process for ordering their web services.</p><h3>Future Plan</h3><p>I am looking to make my set up a lot more lean. I am liking the speed and ease of a VPS and might even consider not replacing the server.</p><p><a
href="http://cheapvps.co.uk/" target="_blank">CheapVPS website</a><br
/> <a
href="http://lxlabs.com/software/hypervm/" target="_blank">HyperVM home page</a></p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/bash-man-command-not-found/' rel='bookmark' title='bash: man: command not found'>bash: man: command not found</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/vps-hosting-with-cheapvps/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <enclosure
url="http://tllts.org/mirror.php?fname=tllts_278-12-17-08.mp3" length="27599958" type="audio/mpeg" /> </item> <item><title>WordPress Permalink Change Error</title><link>http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/</link> <comments>http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/#comments</comments> <pubDate>Wed, 15 Oct 2008 11:46:17 +0000</pubDate> <dc:creator>Danny</dc:creator> <category><![CDATA[Website]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[AllowOverride]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[permalink]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[SymLinks]]></category> <category><![CDATA[Toby]]></category> <category><![CDATA[Ubuntu]]></category> <guid
isPermaLink="false">http://www.dannytsang.co.uk/?p=1377</guid> <description><![CDATA[Overview I was changing the permalinks in WordPress from the default and obscure post/page numbers to a more URL friendly style with the date and title of the post. Once I had changed the permalink settings it loaded the home &#8230; <a
href="http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/">Continue reading <span
class="meta-nav">&#8594;</span></a> Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/' rel='bookmark' title='Apache 2 Hardening Tips'>Apache 2 Hardening Tips</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-221-upgrade-again-update/' rel='bookmark' title='WordPress 2.2.1 Upgrade Again (Update)'>WordPress 2.2.1 Upgrade Again (Update)</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/install-magento-localization-setting-problem/' rel='bookmark' title='Install Magento Localization Setting Problem'>Install Magento Localization Setting Problem</a></li></ol>]]></description> <content:encoded><![CDATA[<h3>Overview</h3><p>I was changing the permalinks in <a
href="http://www.dannytsang.co.uk/index.php/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with WordPress">WordPress</a> from the default and obscure post/page numbers to a more URL friendly style with the date and title of the post. Once I had changed the <a
href="http://www.dannytsang.co.uk/index.php/tag/permalink/" class="st_tag internal_tag" rel="tag" title="Posts tagged with permalink">permalink</a> settings it loaded the home page correctly but any links away from this page on this site caused an error along the lines of &#8220;The requested URL was not found on this <a
href="http://www.dannytsang.co.uk/index.php/tag/server/" class="st_tag internal_tag" rel="tag" title="Posts tagged with server">server</a>&#8221;. This is when <a
href="http://www.tweston.co.uk" target="_blank">Toby</a> came to the rescue with his <a
href="http://www.dannytsang.co.uk/index.php/tag/google/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a> fu.</p><h3><a
href="http://www.dannytsang.co.uk/index.php/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">PHP</a> Mods</h3><p>The first problem was that the PHP MOD_REWRITE was not enabled. I&#8217;m guessing this allowed PHP to write to files on the server. A quick command:<br
/> <code>sudo a2enmod rewite</code><br
/> to enable the module and<br
/> <code>sudo /etc/init.d/<a
href="http://www.dannytsang.co.uk/index.php/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>2 reload</code><br
/> to reload the server settings in <a
href="http://www.dannytsang.co.uk/index.php/tag/ubuntu/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Ubuntu">Ubuntu</a> server made this correct. This still did not solve my problem.</p><h3>Apache <a
href="http://www.dannytsang.co.uk/index.php/tag/allowoverride/" class="st_tag internal_tag" rel="tag" title="Posts tagged with AllowOverride">AllowOverride</a></h3><p>The AllowOverride directive had to be enabled. This was originally set to <code>None</code> but changing this directive in <Directory
/> and in <Directory
[path_to_website] /> to <code>All</code> solved the problem. The second directive is referred to site specific where the [path_to_website] is the root path.</p><h3>Other Settings</h3><p>The other things to look out for is a writable .htaccess file in the root directory of the website. <a
href="http://www.dannytsang.co.uk/index.php/tag/symlinks/" class="st_tag internal_tag" rel="tag" title="Posts tagged with SymLinks">SymLinks</a> should be enabled in the Apache configuration for the website too.</p><p>Related posts:<ol><li><a
href='http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/' rel='bookmark' title='Apache 2 Hardening Tips'>Apache 2 Hardening Tips</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/wordpress-221-upgrade-again-update/' rel='bookmark' title='WordPress 2.2.1 Upgrade Again (Update)'>WordPress 2.2.1 Upgrade Again (Update)</a></li><li><a
href='http://www.dannytsang.co.uk/index.php/install-magento-localization-setting-problem/' rel='bookmark' title='Install Magento Localization Setting Problem'>Install Magento Localization Setting Problem</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://www.dannytsang.co.uk/index.php/wordpress-permalink-change-error/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
