Im Durchschnitt wird dieses Tutorial Install OpenLiteSpeed on Ubuntu 16.04 mit 5 bewertet, wobei 1.0 die schlechteste und 5.0 die beste Bewertung ist. Es haben insgesamt 647 Besucher eine Bewertung abgegeben.
647 0

Install OpenLiteSpeed on Ubuntu 16.04

from gridscale Team Ubuntu WebServer
Install OpenLiteSpeed on Ubuntu

OpenLiteSpeed – Alternative to Apache2 and Nginx

OpenLiteSpeed is a high-performance, resource-conserving open-source alternative to Apache2 and Nginx. The HTTP server has already shown in many independent tests that it can be quite faster than Apache and Nginx. In addition, it is very easy to use, so the configuration of the vHosts and the port assignments take place via a dedicated web interface. In this article, I will show you how to install OpenLiteSpeed on Ubuntu 16.04, create a web page, and use Let’s Encrypt to validate it with a valid SSL certificate. Since Let’s Encrypt is not yet officially supported, we have to create the certificate manually and then integrate it via the web interface. But more about that later.

Prepare the server

Create a server with Ubuntu 16.04 LTS with a cloud provider of your choice. How this works with gridscale, I show you in the article How to gridscale.
As before each installation, you should update your server. Connect to your server via ssh and execute the following command:

apt -y update && apt -y upgrade && apt -y dist-upgrade

Now your server is up to date and the installation of OpenLiteSpeed can begin.

Download the 1-Click-Installer

OpenLiteSpeed offers several types of installation. I’ll show you today the easiest installation with the 1-Click Installer. To do this simply execute the following command:

wget --no-check-certificate https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh && bash ./ols1clk.sh

After the download, the installer will open and ask you if you agree to the installation. This is confirmed by [y].
Permission to install

Set user name and admin password

During installation you are given a password. Execute the following command to overwrite this:

/usr/local/lsws/admin/misc/admpass.sh

Here you can specify your username and password for admin access. Note that this is overwritten in the database, so your old data will not work.
Username and password for admin access

The Web Interface

As already mentioned, the configuration of the web server – unlike Apache or Nginx – takes place via a web interface. You can reach this via [IPdeinesServers]: 7080. When you first log in, your browser will tell you that the SSL certificate is not trustworthy. This is because the server signs it itself. In this case you can easily skip this information. Then log in with the data you created in the last step.

Login
The installation of OpenLiteSpeed has now been completed, now follow the configuration.

Let’s Encrypt

The provider Let’s Encrypt is a SSL certificate, which is recognized by most browsers, which allows you to offer your pages via HTTPS without a warning in the browser of your client. Since Let’s Encrypt is not officially supported, it is still somewhat complicated to integrate the certificate. I’ll show you now the easiest way for this.
First, you must install Let’s Encrypt on your server:

apt -y install letsencrypt

Then run the following command to create a certificate for your domain. For this, however, first your domain via A-Record must point to the IPv4 address of your server as well as an AAAA record to the IPv6 address of your server. How this works in detail, you will learn from your domain provider.

letsencrypt certonly -d meine-domain.tld -d www.meine-domain.tld

If you use a subdomain, you can omit the part with “www”. You will then be asked to enter your e-mail address. Only important notifications for your certificate are sent to this address, for example if this is about to expire. Then you accept the general terms and conditions. Now Let’s Encrypt should congratulate you on your new certificate and tell you the location. This is what you need for the next step.

Include SSL certificate in OpenLiteSpeed and set up Redirect

To do this, change back to the Web interface of LiteSpeed and click “Listeners” in the left menu. You can delete all existing listeners here. Next, click on “Add” to create a new listener.

Click on
In the next step, fill out the fields as follows:

Listeners Name: [Name deines Projektes oder deiner Domain] (SSL)
IP Address: ANY
Port: 443
Binding –bitte so lassen-
Secure: YES
Notes: //

The whole thing should look something like this:

Address Settings
Then save the whole thing in the upper right corner. Now click on the name of your listener and create a new entry under “Virtual Host Mappings”. This should look as follows:

New item for New listener
Then you switch to the tab “SSL” and edit the first table.

First table under tab SSL

Here are the paths to your previously created Let’s Encrypt certificates.

Paths to Let's Encrypt Certificates
Under “SSL Protocol” you have to set the checkmarks for SSL v3.0, TLS v1.0 TLS v.1.1 and TLSv1.2.

save
Next, create another listener with the following data:

Listeners Name: [Name of your project or domain]
IP Address: ANY
Port: 80
Binding –leave it as it is-
Secure: NO
Notes: //

Additional listeners
Under “Virtual Host Mappings” are the same entries as under the SSL profile.
Then save the whole thing again. The listeners should now look like this:

Two Listeners
Surely you already noticed the warning above. Since this comes back after every change, I recommend you first complete the tutorial and then perform the “graceful restart”.
At present, requests to port 80 and to port 443 (SSL) are also forwarded to the web page. So that incoming requests on port 80 are now redirected automatically to port 443 and thus to HTTPS, you still have to configure a URL rewrite.
To do this, click “Virtual Hosts” in the left menu and then edit the “Example” entry on which your two ports are currently pointing.
Under the tab “Rewrite” you have to edit the first table and set “Yes” after “Enable Rewrite”. After saving, you edit the “Rewrite Rules” in the last table and enter the following:

RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

So it should look like this:
Rewrite Rules
Save everything and finally restart the server with a click on the green highlighted gyro.
Open a new tab in your browser and visit your domain. You should automatically be redirected to HTTPS: // [your domain] / and see the example page of OpenLiteSpeed.
Congratulation! Your server is now ready for use.

Conclusion

After dealing with LiteSpeed, it is a real alternative to Apache2 and Nginx. The web interface is very comfortable to use and it is constantly being developed further.

OpenLiteSpeed – Alternative to Apache2 and Nginx OpenLiteSpeed is a high-performance, resource-conserving open-source alternative to Apache2 and Nginx. The HTTP server has already shown in many independent tests that it can be quite faster than Apache and Nginx. In addition, it is very easy to use, so the configuration of the vHosts and the port assignments […]

Schade, dass dir der Artikel nicht gefallen hat.
Was sollten wir deiner Meinung nach besser machen?

Thank you for your feedback!
We will get back to you as soon as the article is finished.

Übrigens: kennst du schon unser Tutorial zum Thema Create SSH-Keys for Ubuntu 16.04?

×

Developer?

Get the latest gridscale developer tutorials here.
And don’t worry - we won’t spam you