Litespeedtech logo webserver howto?


Installing and using Litespeed webserver under Linux     Also in: Nederlands


What is Litespeed webserver?

Litespeed webserver is as it already says a webserver, with 3 different types of webservers, a standard edition, a professional edition and an enterprise edition (work in progress). The Standard Edition is free for use, just the amounts of connections is limited to 400 concurrent connections. For the professional and the Enterprise edition you have to pay. Pay you say?  Yes, pay for a company who wants support you have to pay for it, which is absolutly normal. So if I use the Standard version I get no support? Wrong Litespeed Technologies gives you support, through the forums and bug reports, so you are covered, but paying gives you extra support. LiteSpeed webserver is a full-featured web server with the combination of ease of use, performance, security, and reliability! It is easy in the way how it installs onto your server, which we will describe in a seperate part. Futhermore it is easy to use in the way to configurating, this because of a admin interface in this interface you can change and add configuration parameters.  We even don't have  to compile Litespeed webserver, just unpack it and install it.
How fast is LiteSpeed? LiteSpeed is up to 5 times faster than Apache, under high concurrency. How can LiteSpeed be faster than Apache, well through a good architecture and heavily optimized code. For detailed results, please visit the litespeedtech.com site and go to their Benchmarks section.
LiteSpeed can handle thousands of concurrent connections with a small memory footprint, and  it is less vulnerable when facing various attacks.


Installation of
Litespeed webserver:


Before we can install Litespeed webserver, we have to download it from the litespeedtech site. And get the latest version (stable or Beta).
We choice to download the latest version 1.5.8, click here to download that version of litespeed. It's filesize is about 2.6 MB, the release date of this version was September 9th,2004. Remark, since 23 August 2004 the beta  2.0RC1 version is available,
which has the following add-on features an Apache compatible rewrite engine, Microsoft FrontPage Server Extension Support and directory auto indexing.  Want  to upgrade? Read the upgrade part.

After we recieved the file, we have a tarred gzipped file in our download directory, now follow the instructions below to install this product, it is as easy as possible.

  1. Extract the downloaded file with :  root@eisnote:/root/download/> tar -zxvf lsws-1.5.8-std-i386-linux.tar.gz
  2. A new directory is created with the output of the extracting, the name of the directory is: lsws-1.5.8
  3. Change to that directory:  cd lsws-1.5.8
  4. Start the install script : root@eisnote:/root/download/lsws-1.5.8> ./install.sh     (I'm using Bash so ./ )
  5. Now the installing script starts and you will see a license agreement. Read it and if you agree, enter Yes to continue
  6. The next question asks you where you want litespeed to be installed, we select the directory /var/www
  7. Due to the fact that the directory /var/www exists we get the following response:
  8. The destination directory /var/www exists.
    To upgrade, press 'Enter', current configuration will not be changed.
    To reinstall, press 'R' or 'r'.
    To change directory, press 'C' or 'c'.

    Would you like to Upgrade, Reinstall or Change directory [U/r/c]?          enter the r for Reinstall

  9. After this, we get a question which username we like to use for administrator, the default name is admin we stick to that. Press Enter
  10. Now we have to enter a password for the username admin, think of a password , enter it and after this you have to enter the same password again to verify that you haven' t misspeld it.
  11. After this we have to give a username which will run litespeed webserver. As noted by the installation program this shouldn't be the root user, because of security reasons. The default user is nobody  we also take this one, so press enter.
  12. Now we have to give a group name, the default group is nogroup also this will do for us, press enter.
  13. Now the script asks you on which port the litespeed webserver has to look for incoming data, the default port is 8088, but we are using port 80, so enter 80.  Make sure that no other program is listening to port 80!
  14. Because Litespeed webserver has a admin panel which we can access through a webbrowser we get a question on which port we want to have the administration web interface, the default port is 7080 and this port we are using too, so press enter.
  15. The install script now asks if we want to setup PHP. Of course we want that, press enter and the default Y we be filled in.
  16. Next issue, Suffix for PHP script(comma separated list) [php]:  press enter cause this is good.
  17. A little delay and PHP is installed. Then we get a question if we want to change PHP opcode cache setting? Just enter this question because we have installed the 'builtin' PHP.
  18. We now get a finished installation response like:
  19. Congratulations! The LiteSpeed Web Server has been successfully installed.
    Command line script - "/var/www/bin/lswsctrl"
    can be used to start or stop the server.

    It is recommended to limit access to the web administration interface.
    Right now the interface can be accessed from anywhere where this
    machine can be reached over the network. Three options are available:
    1. If the interface needs to be accessed only from this machine, just
       change the listener for the interface to only listening on the loopback
       interface - localhost(127.0.0.1).
    2. If the interface needs to be accessible from limited IP addresses or sub
       networks, then set up access control rules for the interface accordingly.
    3. If the interface has to be accessible via internet, SSL (Secure Sockets
       Layer) should be used. Please read respective HOW-TOs on SSL configuration.

    To change configurations of the interface, login and click
    "Interface Configuration" button on the main page.
    The administration interface is located at http://localhost:<ADMIN_PORT>/
    or http://<ip_or_Hostname_of_this_machine>:<ADMIN_PORT>/


    As you can read in the above text we should secure the admin interface, do this as you need to secure it.
    And the question is  we would like to have LiteSpeed Web Server started automatically when the machine restarts [Y/n]?  Well we would like that, so just Enter again to comfirm this question.

  20. And after this the installation script asks us "Would you like to start it right now [Y/n]?".  Well we want to see if it works, so press Enter to start LiteSpeed Webserver.
  21. Now we get the following response:
  22. [OK] lshttpd: pid=3722.

    LiteSpeed Web Server started successfully! Have fun!
     

To check if Litespeed webserver is active we do a:  ps -ef | grep ls   with the following response:
root      3721        1  0 14:20 ?        00:00:00 ./lshttpd
nobody 3722  3721  0 14:20 ?        00:00:03 ./lshttpd
root      3725  3722  0 14:20 ?        00:00:00 lscgid

Which say to us that Litespeed webserver is running. But the best way to check this of course is to start a webbrowser and go to localhost
like you can see here:
  We have contact with litespeed



LiteSpeed webserver Administration:

To administer LiteSpeed webserver Litespeedtech build a administrator panel in their webserver. We saw that we had to define a portnumber
for the administrator panel, which we had on port 7080. So what we have to do to get into the administrator panel is to open a webbrowser and
go to our server , in this case the localhost, and surf to it on port 7080. Enter the following command in de url-bar: http://localhost:7080/  and the administrator panel will appear. Here the url-bar url bar
After you have entered this, you will get the following screen, which is the first screen of your administrator panel.
administrator panel

Now click on the logon the administrator panel to logon to the administrator panel. You still remember your password don't you ? Now we have to enter the userid and the password in the next popup screen: inloggen

Here we enter the name Admin and the password you have entered during the installation procedure. If you have enter this, you can hit the OK button to logon to the administrator panel. Then we get to see the Administrator Interface which looks like this:
logged on



In this Administration Interface you got 3 clickable icons to administer your LiteSpeed webserver, I give a short explanation about it,
if there is demand I perhaps will describe them in more detail later on, but all needed information is in the documentation that LiteSpeedTech gives us. For now I give you a brief overview about them, following below:



server config icon Server Configuration icon:

Click with your mouse on the Server Configuration icon
and the server configuration section will appear in the browser.
server config in admin interface

There are quite some options in this sections, for the whole server there are 5 tabs with options, futhermore you got a Listeners and a Virtual Hosts section.  The options of the whole server a defined in 5 tabs and here are their sub-options:

General  Here you can find general setting for your webserver like the following
Server Process
 Server name, owner,Priority, I/O Buffer, Swap dir, Start server automatic?
General Settings  MIME settings, Index Files, Show version?, Administrator email
Server Log  The logfile settings.
Access Log  The access log settings
HT Access  Allow access or not!
Expires Settings  Expires settings
Tuning  Here we fine tune the LiteSpeed webserver
Connection Tuning  About maximum connections, buffers and timeouts.
Request/Response Tuning  The maximum settings are entered here.
GZIP Compression Tuning  Do you want GZIP Compression?
Security  Here we can mange the security of LiteSpeed webserver
File Access Control  Links and masks
Per Client Connection Control  Limits are defined here
CGI Resource Control  All about CGI
Access Denied Directories  The path to the access denied dirs.
Access Control  My I access it or not?
External Apps  Here we can manage and add external programs
Fast CGI
 maximum connections and so on
more  your external programs
Script Handler  here we definitions of script handlers
Script Handler Definitions
 Handler type, name and action

The Options for the Listeners is a Listener tab (you can have more listeners running, see docu litespeedtech), and when you click on a hostname in the listener tab you get a general tab, where we can enter the following information for that host:
Address settings;
Virtual host mappings.

The options for the Virtual Hosts is a virtual host tab, in this tab you see all your virtual host(s).
If you now click on a virtual hostname, you get 6 tabs where you can setup/modify or add settings to your virtual host.
These tabs are:
General
General
Settings about document root, gzip, email administrator
Index Files
Want to use server settings or virtual host settings
Virtual Host Log
Where to put the logfiles, how large and so on.
Access log Where to put the access log, how large may it become, how long?
HT Access Access rights
Expires Settings enable/disable expiration?
Security
General
Enable context control?
Hotlink control All about link control (hotlinks)
Access control The Allow and Denied lists
Authorization Realm Locations, cache size, timing
External Apps
Context
/protected/ Directory , access, names
/blocked/ Directory , access
Script Handler
Script Handler Definition
Suffix, Handler type, Handler name, Action
Error Pages
Customized Error Pages
Where are the error pages?




service manager Service Manager:

Click with your mouse on the Service Manager icon and the service Manager section will appear in the browser.
service manager


In this section you can see information about the following three things: Server, Listeners and the Virual Hosts.
To begin with the view only information, this is for the Listeners here you just can look which listeners are running and
which are not. In this example, just 1 Listener is available (Eislon). It is running and it looks for incoming information on
port 80. Virtual host is also Eislon. This Virtual Host(s) we can Disable and Reload. To do this, click on the corresponding
text under the topic Actions. For the Server section we have something more to tell, we can here Restart- and Reload the
Server.
We also can View the LOGs of LiteSpeed webserver, if we click on this, a new browser window will be show with
the following contains:
View Log

At the Display Level: you can select the following 5 display levels:
  1. ERROR
  2. WARNING
  3. NOTICE
  4. INFO
  5. DEBUG
You can search into the logfile, all other buttons should be clear to you.
Now comes one of the nicest thing of this menu, it is call Real-Time Report  with this option you get a realtime view
of what your webserver is doing, how many active connections, uptime (webserver) andso on, it is best said with a screen
shot well here I got one for you. My advise is to play with it, you can set you refresh rate on the following times: refresh times
Now the promissed screenshot of the realtime report:
Realtime Report
Click on the Refresh button to change refresh-rate. And click then on start realtime report to start the realtime report
utility. To manual refresh the information press refresh . The Default mode is the snapshot mode which
takes a snapshot of your webserver stats. In this window you can see information about the following
things: System Information (what does the host do);
  lshttpd Process (what does lshttpd uses);
  Server Level Statistics (speed of (current) transfers and how the connections are.)
  External App  (shows the resources off the external applications);;
  Virtual host _AdminVhost (Requests in process for all defined hosts);
  Virtual host Eislon (gives information of requests in progress for host eislon).
And this concludes the part of the Service Manager, we now go on to the last topic, WebAdmin configuration.


Webadmin Config icon WebAdmin Configuration:

Click with your mouse on the WebAdmin Configuration icon and the WebAdmin Configuration section will appear in the browser.
WebAdmin Config

In this WebAdmin Configuration screen you change thing for Admin Server  and for Admin Listeners.
For the Admin Server you can change/edit the following things:
General
 Do you want to enable Core Dumps? Set it here.
Virtual Host Log
 You can change here Log settings for the virtual host
Access Log
 What do you want to log into the access log file? How large may the logfile become?
Access Control
 The Allow and Denied list for the server!

For the Admin Listeners you have the options of the Listeners for the servers you run and for the admin Listener it selfs.
You can here give the port number on which the admin listener listens, must it be a secure line or not!
For the virtual servers you can even give up ip addresses which are allowed to use the admin interface!
Just take a look at it, and change it to your needs.

Well this ends the overview of the admin interface but not after I told you that if you keep the admin interface to long open it will
auto disconnect you, this is done for security reasons. If you are timed out and want to go to something in the admin interface, it will
say that you are disconnected and that you may logon again. If you do so you will be send to the last clicked options, even if you are
disconnected, this of course if you logon is checked and found valid. The timeout screen will look like this:
Timed-out
To logon again, click on the text log on  to close the browser window just click on close.


Upgrading LiteSpeed Webserver:

The latest version of LiteSpeed webserver 1.5.7 is available as of 10 August 2004, just installed 1.5.6 and now we have to install a new one? No we just gonna upgrade it, here you find the upgrade procedure and it is very easy.


Start with downloading the 1.5.7 version of LiteSpeed webserver, unpack it and then goto the unpacked directory (lsws-1.5.7) here you start the install-script in a terminal or on the console with the following command: > ./install.sh   yep the same script please.
We then get almost the same installation questions, I go by them one for one again to show you what is different (not much ;-)

1. Do you agree with above license?

We agree to accept the license which was displayed above this question, to do this we have to type Yes as answer.
After this we get the following information:

       Please specify the destination directory. You must have permissions to
       create and manage the directory. It is recommended to install the web server
       at /opt/lsws, /usr/local/lsws or in your home directory like '~/lsws'.

       ATTENTION: The user 'nobody' must be able to access the destination directory.

2. Destination [/opt/lsws]:

We here make the choice to install the litespeed webserver to the directory /var/www which should be the same as the directory that we have entered during the first installation of litespeed webserver. Can this give problems? Because we are running the webserver on the same directory?  Well that's a thing Litespeed has thought of, just read ahead and you will see how this is done.  Notice the remark that the user nobody must have access to the destination directory, look with ls -l on the directory /var/www  if nobody is owner of it, or look into the grouprights if nobody is included.
After we have given the installation directory /var/www, we get the following information:

              The destination directory /var/www exists.
              To upgrade, press 'Enter', current configuration will not be changed.
              To reinstall, press 'R' or 'r'.
              To change directory, press 'C' or 'c'.

3. Would you like to Upgrade, Reinstall or Change directory [U/r/c]?

Due to the fact that we want to upgrade our Litespeed 1.5RC4 webserver to the 1.5 version we have to enter an U for upgrade.

4. Would you like to reset the login password for Administration Web Interface [y/N]?

This question is what it says... do you want to reset the Administrator Web interface login password?  We say N for no here.
After this, the new version of litespeed webserver is being installed, like the below lines tells us:

              Installing, please wait...

As we have done with the first installation of Litespeed webserver we had PHP installed to, now we get some information and a question about it:

              In order to maximize the performance of PHP, a pre-built PHP opcode cache
              can be installed automatically. An opcode cache increases performance of
              PHP scripts by caching them in compiled state, the overhead of compiling
              is voided.

              Note: If an opcode cache has been installed already, you do not need to
              change it. If you built PHP binary by yourself, you need to built
              PHP opcode cache from source as well, unless the version of your
              PHP binary is same as the pre-built PHP opcode cache built for.

5. Would you like to change PHP opcode cache setting [y/N]?

As we want to use PHP we just can hit Enter. And the upgrade is done, as we can concluded from the next information:

   Congratulations! The LiteSpeed Web Server has been successfully installed.
   Command line script - "/var/www/bin/lswsctrl" can be used to start or stop the server.

    It is recommended to limit access to the web administration interface.
    Right now the interface can be accessed from anywhere where this
    machine can be reached over the network. Three options are available:
                          1. If the interface needs to be accessed only from this machine, just
                              change the listener for the interface to only listening on the loopback
                              interface - localhost(127.0.0.1).
                          2. If the interface needs to be accessible from limited IP addresses or sub
                              networks, then set up access control rules for the interface accordingly.
                          3. If the interface has to be accessible via internet, SSL (Secure Sockets
                              Layer) should be used. Please read respective HOW-TOs on SSL configuration.

                              To change configurations of the interface, login and click
                              "Interface Configuration" button on the main page.
                              The administration interface is located at http://localhost:<ADMIN_PORT>/
                              or http://<ip_or_Hostname_of_this_machine>:<ADMIN_PORT>/

Again we get information that we should take care and limit accessing the administrator interface. Like described above (I can't do it better:-)
Now the last question is if we want to restart Litespeed webserver, and of course we want to make us of the new webserver, so just it Enter and it will start as you can see below.

6. Would you like to restart it right now [Y/n]?

                              [OK] lshttpd: pid=3611.
                              LiteSpeed Web Server started successfully! Have fun!


Next to check if it really works!!

7.  Check for the Upgrade to be sucessfull, you can do this by the following means:
                             1. Check with the webbrowser if you (still) can access your website by typing in the
                                  urlbar http://localhost/
                             2.  Go to the commandline and use the command: ps -ef | grep lshttpd  and see
                                  if you get the information of lshttpd on pid number 3611 !   If this is ok, your
                                  upgrade has worked.

Upgrading complete and we have a new stable LiteSpeed webserver running. And what a piece of cake it was.



Conclusion:
If you want a to have a quick webserver with php/cgi-support build in, this is a very good choice. Most websites have enough with these features and if you want more options, use the externel apps feature. Okee, apache has lots of modules to add on, but what of it do you really use, and what do you prefer?  So in overall we can say that LiteSpeed webserver is "Easy to install and Easy in use webserver.  What more do we want?". In my opinion.. give it a try, on a different port perhaps and see how it preforms for your website. For more information, go to Litespeedtech.com , comments about this review can be send to eislon@zonnet.nl


Date: 23 August 2004                             Voor eislon.nl en Tuxzine.net                                       Auteur: S. R. Eissens


eislon.nlDocument made with Nvu