Jump to content

Open Lite Speed

From Wiki
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