<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://www.gawkwire.com/">
	<title type="text">Gawkwire: Web Hosting and Internet News Resource</title>
	<id>http://www.gawkwire.com/</id>
	<link rel="alternate" type="text/html" hreflang="en" href="index.php" />
	<link rel="self" type="application/atom+xml" href="http://www.gawkwire.com/author/ffeingol/index.1.atom" />
	<rights>&amp;copy;2007 Spoonlabs d.o.o.</rights>
	<generator>Vivvo CMS 4.0</generator>
	<updated>2013-05-19T10:08:28-04:00</updated>
	
			
				
					<entry>
						<title>Why a new web server? LiteSpeed Review</title>
	<id>http://www.gawkwire.com/reviews/66.html</id>
<link rel="alternate" type="text/html" hreflang="en" href="http://www.gawkwire.com/reviews/66.html" />
						<published>2008-04-25T04:21:00-04:00</published>
						<updated>2008-04-25T04:21:00-04:00</updated>
						<author>
							<name>ffeingol</name>
						</author>
		<category term="tech" scheme="http://www.gawkwire.com/reviews/66.html" label="tech" />
<summary>Indepth review of LiteSpeed Web Server (LSWS).  
</summary>
<content type="html">&lt;p&gt;&lt;br /&gt;Today it&amp;rsquo;s quite hard for a web host to stay up-to-date with all the latest programming languages.&amp;nbsp; There is a demand to have PHP version 4 and PHP version 5 (did you know that PHP version 4 goes end-of-life at the end of 2007) as well as Ruby on Rails (RoR).&amp;nbsp; Trying to implement all of these with Apache can get quite troublesome.&amp;nbsp; You can run one version of PHP as an Apache module but the other has to run as a CGI.&amp;nbsp; That can cause quite a performance hit.&amp;nbsp; Apache also does not handle RoR.&amp;nbsp; You&amp;rsquo;d have to setup something like Mongrel or fastcgi and that just introduces more issues and complexity.&amp;nbsp; Besides all of that complexity you&amp;rsquo;d also like this to work with your existing control panel (right)?&lt;br /&gt;This is where we make the leap from old tried-and-true Apache to LiteSpeed Web Server (LSWS).&amp;nbsp; You may not have heard a lot about LSWS but hopefully this article will change that.&amp;nbsp; LSWS was developed to be a high-speed web server and remove a lot of the bottlenecks associated with Apache.&amp;nbsp; Let&amp;rsquo;s start out with a simple pro&amp;rsquo;s vs. cons for LSWS.&lt;/p&gt;&lt;p&gt;Pro&amp;rsquo;s&lt;br /&gt;Can read existing Apache configuration files&lt;br /&gt;Can process most mod_rewrite rules&lt;br /&gt;Supports cPanel, DirectAdmin, Plesk and Ensim control panels&lt;br /&gt;Supports .htaccess configuration files&lt;br /&gt;Supports mod_secuirty rules&lt;br /&gt;Can run PHP V4 and V5 side by side on the same server&lt;br /&gt;Built in DoS protection (bandwidth throttling, per IP connection limits and per IP request throttling)&lt;br /&gt;Real time reports of server status&lt;br /&gt;Lets you quickly revert to previous versions after upgrade&lt;br /&gt;Integrated RoR support&lt;br /&gt;Reloads automatically when Apache configuration file is changed&lt;/p&gt;&lt;p&gt;Con&amp;rsquo;s&lt;br /&gt;Expensive (licensed per CPU)&lt;br /&gt;Yearly maintenance fee&lt;br /&gt;Optional email support / free community support&lt;/p&gt;&lt;p&gt;Installation and Configuration&lt;br /&gt;One of the really nice things about LSWS is that you can easily configure it to run on an alternate port and test it out without having to change Apache or modify your Apache configuration.&amp;nbsp; For an example of the installation we&amp;rsquo;re going to assume you are running a cPanel server.&amp;nbsp; This is&amp;nbsp; going to be a very slimmed down install and you can read the full installation documentation on the LiteSpeed Wiki.&lt;/p&gt;&lt;p&gt;1.Download the LSWS software&lt;br /&gt;2.Upload the software to your server / untar the file&lt;br /&gt;3.Copy your trial license per the information in the trial license email&lt;br /&gt;4.Run the install.sh script&lt;/p&gt;&lt;p&gt;At this point the install script is going to ask you a lot of questions.&amp;nbsp; The key ones are:&lt;br /&gt;Choose an admin user-id/password&lt;br /&gt;Run LSWS as (user/group) nobody/nobody&lt;br /&gt;Run LSWS on port 2080&lt;br /&gt;Choose PHP support&lt;br /&gt;Choose .php for the PHP suffix&lt;br /&gt;Don&amp;rsquo;t turn on PHP opcache&lt;br /&gt;Don&amp;rsquo;t turn on AWStats&lt;br /&gt;Don&amp;rsquo;t import Apache configuration (at this time)&lt;br /&gt;Let LSWS start on system restart&lt;br /&gt;Start LSWS &lt;/p&gt;&lt;p&gt;That&amp;rsquo;s it and LSWS is installed.&amp;nbsp; You can now access the LSWS admin console at &lt;a href=&#34;http://youripaddress:7080/&#34;&gt;http://youripaddress:7080&lt;/a&gt; (make sure that both port 7080 (admin interface) and 1080 (temp web address) are open on your firewall.&lt;/p&gt;&lt;p&gt;Next we&amp;rsquo;ll walk through a brief configuration and then you&amp;rsquo;ll be able to test out LSWS while Apache is still running.&lt;/p&gt;&lt;p&gt;Choose &amp;ldquo;Configuration / Server / General&amp;rdquo; from the administrative console menu.&amp;nbsp; We&amp;rsquo;ll set the following options:&lt;br /&gt;Load Apache Configuration =&amp;gt; Yes&lt;br /&gt;Auto Reload On Changes =&amp;gt; Yes&lt;br /&gt;Apache Configuration File =&amp;gt; /usr/local/apache/conf/httpd.conf&lt;br /&gt;Apache Port Offset =&amp;gt; 1000&lt;br /&gt;Apache IP Offset =&amp;gt; 0&lt;br /&gt;PHP suExec =&amp;gt; this should be &amp;ldquo;no&amp;rdquo; if you are currently not running php-suexec and &amp;ldquo;yes&amp;rdquo; if you are running php-suexec.&lt;br /&gt;PHP suExec Max Conn =&amp;gt; 5 (only has meaning if you have php-suexec set to &amp;ldquo;yes&amp;rdquo;)&lt;br /&gt;Next you can go to the &amp;ldquo;HT access&amp;rdquo; section.&amp;nbsp; Check Limit, Auth, FileInfo, Indexes, Options and uncheck none (this will match the default cpanel .htaccess privileges).&lt;br /&gt;You can then restart LSWS from the administrative console or from command line by executing &amp;ldquo;service lsws restart&amp;rdquo;.&amp;nbsp; Once you have restarted LSWS choose &amp;ldquo;General&amp;rdquo; from the administrative menus and you should see a list of the virtual hosts for that server.&amp;nbsp; You can now begin your preliminary testing by accessing an existing site on the server as &lt;a href=&#34;http://www.domain.tld:1080/&#34;&gt;http://www.domain.tld:1080&lt;/a&gt; or secure site via &lt;a href=&#34;https://www.domain.tld:1443/&#34;&gt;https://www.domain.tld:1443/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Rebuilding PHP the next step&lt;br /&gt;One of the reasons that I said you would be performing preliminary testing is that LSWS ships with a pre-built PHP module.&amp;nbsp; That PHP module may not have all the options you want or need built in so you&amp;rsquo;re going to have to build your own PHP.&amp;nbsp; While this process may seem scary it&amp;rsquo;s pretty well documented on the LiteSpeed Wiki.&amp;nbsp; Before we dive into building PHP I need to touch on LSAPI or the LiteSpeed Server Application Programming Interface.&amp;nbsp; The LSAPI is simply an interface that sits between the LSWS and PHP or Ruby.&amp;nbsp; The LSAPI allows PHP to basically run as fast as an Apache module when in fact it runs much more like a CGI/php-suexec process.&amp;nbsp; Here is a high level overview on how to build PHP with the LSAPI (again check the LiteSpeed Wiki for the gory details):&lt;br /&gt;Download whatever PHP version you want to your server&lt;br /&gt;Extract the tarball&lt;br /&gt;cd to the sapi directory&lt;br /&gt;download and then extract the PHP lsapi&lt;br /&gt;move back up a directory (i.e. cd ..)&lt;br /&gt;run &amp;ldquo;touch ac*&amp;rdquo;&lt;br /&gt;run &amp;ldquo;./buildconf &amp;ndash;force&amp;rdquo;&lt;/p&gt;&lt;p&gt;At this point you are ready to perform the traditional &amp;ldquo;configure, make, make install&amp;rdquo; of just about every Open Source &amp;ldquo;c&amp;rdquo; program.&amp;nbsp; There are 3 key configure options you&amp;rsquo;ll want to set:&lt;/p&gt;&lt;p&gt;-- prefix=/some/directory&lt;br /&gt;This is going to be the directory where PHP libraries, PEAR etc. get installed.&amp;nbsp; You have a choice here as to where you want PHP installed.&amp;nbsp; LiteSpeed support suggests installing PHP in the same directory as cPanel installs PHP (if you have a cPanel server).&amp;nbsp; This gives you the most compatibility with cPanel.&amp;nbsp; I prefer to install it in a totally separate directory and then using the php.ini file to bring in the cPanel compiled libraries (like PEAR etc.).&lt;/p&gt;&lt;p&gt;-- with-litespeed&lt;/p&gt;&lt;p&gt;This tells the configuration process that you want to use the LSAPI&lt;/p&gt;&lt;p&gt;--with-config-file-path=&lt;/p&gt;&lt;p&gt;This is the full path (or a relative path) to your php.ini file&lt;/p&gt;&lt;p&gt;You&amp;rsquo;ll then want to add on all the other configure options that you are currently running.&amp;nbsp; There are several methods to extract this information from command line php or you can simply create a phpinfo() page and look at the configuration options there.&lt;br /&gt;Once the build completes, you will want to copy your new php module (which will be called php under the sapi/litespeed directory) over to the LSWS fcgi-bin directory (it&amp;rsquo;s called lsphp in that directory by default).&amp;nbsp; Restart LSWS and you will now be running your custom compiled PHP.&lt;/p&gt;&lt;p&gt;LSWS can&amp;rsquo;t do everything (yet)&lt;br /&gt;One thing that LSWS can&amp;rsquo;t handle is Server Side Includes (SSI).&amp;nbsp; This can be easily handled with LSWS by simply proxying the request back to your existing Apache web server (yes, if you have SSI you&amp;rsquo;ll have to keep Apache around).&amp;nbsp; The configuration is done via the administrative web console by specifying the extensions (normally .shmtl) to proxy back to Apache.&lt;br /&gt;Currently the LSAPI can&amp;rsquo;t handle .phps (PHP pages that show the source code) so you&amp;rsquo;ll have to proxy those pages back also (again by the extension).&amp;nbsp; We&amp;rsquo;re told that a future version of the LSAPI will handle .phps pages but the proxying will work for now.&lt;br /&gt;While keeping the existing Apache server around may sound bad, it&amp;rsquo;s really necessary.&amp;nbsp; The biggest reason is that cPanel (and many other control panels) simply expect it to be there.&amp;nbsp; When you add a new site to cPanel (or any other control panel that I know of) it will attempt to restart Apache (because that is what it believes is serving up the web pages).&amp;nbsp; If Apache is not there the control panel is going to complain loudly that it can&amp;rsquo;t restart Apache.&amp;nbsp; The good news here is that since Apache is not serving up many pages (most likely just SSI pages) it won&amp;rsquo;t take much memory or resources.&lt;/p&gt;&lt;p&gt;LiteSpeed Costs&lt;br /&gt;As previously mentioned in this article LSWS is not free software.&amp;nbsp; There are both purchase and lease options available.&amp;nbsp; The following table is a summary of the pricing (as of this article):&lt;/p&gt;&lt;p&gt;Version&amp;nbsp;&amp;nbsp;Owned&amp;nbsp;&amp;nbsp;Yearly Lease&amp;nbsp;Monthly Lease&lt;br /&gt;VPS&amp;nbsp;&amp;nbsp;$249&amp;nbsp;&amp;nbsp;$150&amp;nbsp;&amp;nbsp;$14&lt;br /&gt;1 CPU-Core&amp;nbsp;$449&amp;nbsp;&amp;nbsp;$349&amp;nbsp;&amp;nbsp;$32&lt;br /&gt;2 CPU-Core&amp;nbsp;$799&amp;nbsp;&amp;nbsp;$449&amp;nbsp;&amp;nbsp;$46&lt;br /&gt;4 CPU-Core&amp;nbsp;$1299&amp;nbsp;&amp;nbsp;$699&amp;nbsp;&amp;nbsp;$65&lt;/p&gt;&lt;p&gt;Maintenance is $99 / year and $50 per additional CPU-Core (so a 2 CPU-Core maintenance would be $149).&amp;nbsp; Maintenance is strictly for software updates and does not include email support.&lt;/p&gt;&lt;p&gt;As a note, you don&amp;rsquo;t actually have to match the license to your physical hardware specification.&amp;nbsp; In other words if you have a 4 CPU-Core server you can buy a 2 CPU-Core license.&amp;nbsp; The 2 CPU-Core license is optimized for a 2 CPU-Core server and it will simply ignore the extra CPU-Cores and other processes (like PHP) can use the extra 2 cores.&lt;/p&gt;&lt;p&gt;Conclusion&lt;br /&gt;While the price tag on LSWS may be a bit hard to swallow from the authors experience, the cost has justified itself:&lt;br /&gt;We are now running PHP V4/V5 on the same server and clients are very happy&lt;br /&gt;We&amp;rsquo;ve reduced memory utilization&lt;br /&gt;Server load has been lowered&lt;br /&gt;We&amp;rsquo;re able to run more sites on the same hardware avoiding new hardware costs.&lt;/p&gt;
&lt;a href=&#34;http://www.gawkwire.com/reviews/66.html&#34;&gt;http://www.gawkwire.com/reviews/66.html&lt;/a&gt;
</content>
					</entry>
				
			
		
</feed>