Jump to content

Open Lite Speed: Difference between revisions

From Wiki
Created page with " wget -O - <nowiki>http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh</nowiki> | sudo bash sudo apt install -y openlitespeed sudo systemctl enable lshttpd s..."
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<syntaxhighlight lang="shell">
wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | sudo bash
</syntaxhighlight>


wget -O - <nowiki>http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh</nowiki> | sudo bash
<syntaxhighlight lang="shell">
sudo apt install -y openlitespeed
</syntaxhighlight>


sudo apt install -y openlitespeed
<syntaxhighlight lang="shell">
sudo systemctl enable lshttpd
</syntaxhighlight>


sudo systemctl enable lshttpd
<syntaxhighlight lang="shell">
sudo systemctl start lshttpd
</syntaxhighlight>


sudo systemctl start lshttpd
<syntaxhighlight lang="shell">
sudo systemctl status lshttpd
</syntaxhighlight>


sudo systemctl status lshttpd
*Output
*Output


● lshttpd.service - OpenLiteSpeed HTTP Server
<syntaxhighlight lang="shell">
      Loaded: loaded (/etc/systemd/system/lshttpd.service; enabled; vendor preset: enabled)
● lshttpd.service - OpenLiteSpeed HTTP Server
      Active: active (running) since Mon 2021-05-31 04:59:06 EDT; 14min ago
    Loaded: loaded (/etc/systemd/system/lshttpd.service; enabled; vendor preset: enabled)
    Main PID: 7213 (litespeed)
    Active: active (running) since Mon 2021-05-31 04:59:06 EDT; 14min ago
      CGroup: /system.slice/lshttpd.service
  Main PID: 7213 (litespeed)
              ├─7213 openlitespeed (lshttpd - main)
    CGroup: /system.slice/lshttpd.service
              ├─7224 openlitespeed (lscgid)
            ├─7213 openlitespeed (lshttpd - main)
              ├─7253 openlitespeed (lshttpd - #01)
            ├─7224 openlitespeed (lscgid)
              └─7254 openlitespeed (lshttpd - #02)
            ├─7253 openlitespeed (lshttpd - #01)
            └─7254 openlitespeed (lshttpd - #02)
May 31 04:59:04 focal systemd[1]: Starting OpenLiteSpeed HTTP Server...
 
May 31 04:59:04 focal lswsctrl[7171]: [OK] litespeed: pid=7213.
May 31 04:59:04 focal systemd[1]: Starting OpenLiteSpeed HTTP Server...
May 31 04:59:06 focal systemd[1]: Started OpenLiteSpeed HTTP Server.
May 31 04:59:04 focal lswsctrl[7171]: [OK] litespeed: pid=7213.
May 31 04:59:06 focal systemd[1]: Started OpenLiteSpeed HTTP Server.
</syntaxhighlight>


*Check OpenLiteSpeed version.
*Check OpenLiteSpeed version.


/usr/local/lsws/bin/openlitespeed -v
<syntaxhighlight lang="shell">
/usr/local/lsws/bin/openlitespeed -v
</syntaxhighlight>


*Output
*Output
LiteSpeed/1.6.21 Open
 
module versions:
<syntaxhighlight lang="shell">
modgzip 1.1
LiteSpeed/1.6.21 Open
cache 1.62
module versions:
modinspector 1.1
modgzip 1.1
uploadprogress 1.1
cache 1.62
mod_security 1.4
modinspector 1.1
  (built: Tue Apr  6 13:20:57 UTC 2021)  
uploadprogress 1.1
module versions:
mod_security 1.4
modgzip 1.1
(built: Tue Apr  6 13:20:57 UTC 2021)  
cache 1.62
module versions:
modinspector 1.1
modgzip 1.1
uploadprogress 1.1
cache 1.62
mod_security 1.4
modinspector 1.1
uploadprogress 1.1
mod_security 1.4
</syntaxhighlight>


*Secara default, OpenLiteSpeed mendengarkan pada port 8088, kita perlu membuatnya mendengarkan pada port 80. Edit file konfigurasi utama dengan editor teks baris perintah seperti Nano.
*Secara default, OpenLiteSpeed mendengarkan pada port 8088, kita perlu membuatnya mendengarkan pada port 80. Edit file konfigurasi utama dengan editor teks baris perintah seperti Nano.


sudo nano /usr/local/lsws/conf/httpd_config.conf
<syntaxhighlight lang="shell">
vim /usr/local/lsws/conf/httpd_config.conf
</syntaxhighlight>


*Temukan baris berikut
*Temukan baris berikut
listener Default{
<syntaxhighlight lang="lighttpd">
    address                  *:8088
listener Default{
    secure                  0
    address                  *:8088
    map                      Example *
    secure                  0
}
    map                      Example *
}
</syntaxhighlight>


*Change 8088 to 80.
*Change 8088 to 80.
*Output
*Output
listener Default{
 
    address                  *:80
<syntaxhighlight lang="lighttpd">
    secure                  0
listener Default{
    map                      Example *
    address                  *:80
}
    secure                  0
    map                      Example *
}
</syntaxhighlight>


*Simpan dan tutup file. Kemudian restart OpenLiteSpeed.
*Simpan dan tutup file. Kemudian restart OpenLiteSpeed.


sudo systemctl restart lshttpd
<syntaxhighlight lang="shell">
sudo systemctl restart lshttpd
</syntaxhighlight>


<blockquote>Catatan: Jika Anda memiliki server web lain seperti Nginx yang berjalan di server, Anda harus menghentikannya, lalu restart OpenLiteSpeed.</blockquote>
<blockquote>Catatan: Jika Anda memiliki server web lain seperti Nginx yang berjalan di server, Anda harus menghentikannya, lalu restart OpenLiteSpeed.</blockquote>


sudo systemctl stop nginx
<syntaxhighlight lang="shell">
sudo systemctl stop nginx
</syntaxhighlight>


*Sekarang ketikkan alamat IP publik server Ubuntu 20.04/18.04 Anda di bilah alamat browser. Anda akan melihat halaman Web “Selamat”, yang berarti server Web OpenLiteSpeed berjalan dengan baik.
*Sekarang ketikkan alamat IP publik server Ubuntu 20.04/18.04 Anda di bilah alamat browser. Anda akan melihat halaman Web “Selamat”, yang berarti server Web OpenLiteSpeed berjalan dengan baik.
*Jika koneksi ditolak atau gagal diselesaikan, mungkin ada firewall yang mencegah permintaan masuk ke port TCP 80. Jika Anda menggunakan firewall iptables, maka Anda perlu menjalankan perintah berikut untuk membuka port TCP 80.
*Jika koneksi ditolak atau gagal diselesaikan, mungkin ada firewall yang mencegah permintaan masuk ke port TCP 80. Jika Anda menggunakan firewall iptables, maka Anda perlu menjalankan perintah berikut untuk membuka port TCP 80.


sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
<syntaxhighlight lang="shell">
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
</syntaxhighlight>


*Jika Anda menggunakan firewall UFW, jalankan perintah ini untuk membuka port TCP 80.
*Jika Anda menggunakan firewall UFW, jalankan perintah ini untuk membuka port TCP 80.


sudo ufw allow http
<syntaxhighlight lang="shell">
sudo ufw allow http
</syntaxhighlight>


==Referensi==
==Source==
*[https://bit.ly/3Bv6jSs linuxbabedotcom]
*[https://www.linuxbabe.com/ubuntu/install-openlitespeed-mariadb-php-ubuntu linuxbabe.com]


[[Category:Server]]
[[Category:Server]]
[[Category:Linux]]
[[Category:Linux]]
[[Category:Tutorial]]
[[Category:Open Lite Speed]]

Latest revision as of 15:48, 25 November 2022

wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | sudo bash
sudo apt install -y openlitespeed
sudo systemctl enable lshttpd
sudo systemctl start lshttpd
sudo systemctl status lshttpd
  • Output
 lshttpd.service - OpenLiteSpeed HTTP Server
     Loaded: loaded (/etc/systemd/system/lshttpd.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-05-31 04:59:06 EDT; 14min ago
   Main PID: 7213 (litespeed)
     CGroup: /system.slice/lshttpd.service
             ├─7213 openlitespeed (lshttpd - main)
             ├─7224 openlitespeed (lscgid)
             ├─7253 openlitespeed (lshttpd - #01)
             └─7254 openlitespeed (lshttpd - #02)

May 31 04:59:04 focal systemd[1]: Starting OpenLiteSpeed HTTP Server...
May 31 04:59:04 focal lswsctrl[7171]: [OK] litespeed: pid=7213.
May 31 04:59:06 focal systemd[1]: Started OpenLiteSpeed HTTP Server.
  • Check OpenLiteSpeed version.
/usr/local/lsws/bin/openlitespeed -v
  • Output
LiteSpeed/1.6.21 Open
	module versions:
	modgzip 1.1
	cache 1.62
	modinspector 1.1
	uploadprogress 1.1
	mod_security 1.4
 (built: Tue Apr  6 13:20:57 UTC 2021) 
	module versions:
	modgzip 1.1
	cache 1.62
	modinspector 1.1
	uploadprogress 1.1
	mod_security 1.4
  • Secara default, OpenLiteSpeed mendengarkan pada port 8088, kita perlu membuatnya mendengarkan pada port 80. Edit file konfigurasi utama dengan editor teks baris perintah seperti Nano.
vim /usr/local/lsws/conf/httpd_config.conf
  • Temukan baris berikut
listener Default{
    address                  *:8088
    secure                   0
    map                      Example *
}
  • Change 8088 to 80.
  • Output
listener Default{
    address                  *:80
    secure                   0
    map                      Example *
}
  • Simpan dan tutup file. Kemudian restart OpenLiteSpeed.
sudo systemctl restart lshttpd

Catatan: Jika Anda memiliki server web lain seperti Nginx yang berjalan di server, Anda harus menghentikannya, lalu restart OpenLiteSpeed.

sudo systemctl stop nginx
  • Sekarang ketikkan alamat IP publik server Ubuntu 20.04/18.04 Anda di bilah alamat browser. Anda akan melihat halaman Web “Selamat”, yang berarti server Web OpenLiteSpeed berjalan dengan baik.
  • Jika koneksi ditolak atau gagal diselesaikan, mungkin ada firewall yang mencegah permintaan masuk ke port TCP 80. Jika Anda menggunakan firewall iptables, maka Anda perlu menjalankan perintah berikut untuk membuka port TCP 80.
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
  • Jika Anda menggunakan firewall UFW, jalankan perintah ini untuk membuka port TCP 80.
sudo ufw allow http

Source