Panduan cara menambah domain di LiteSpeed/OpenLiteSpeed web server (membangun Virtual Host). Via koneksi SSH bikin folder bagi menyimpan file web dan log dengan command berikut.
mkdir -p /usr/local/lsws/idnetter.com/{html,logs}
Set CHOWN user dan group sesuai konfigurasi dikala install OpenLiteSpeed (defaultnya nobody:nogroup), kalau LiteSpeed dapat dilihat di suEXEC User dan suEXEC Group (WebAdmin Console).
chown -R nobody:nogroup /usr/local/lsws/idnetter.com
Berikutnya, akses WebAdmin LiteSpeed via browser, https://ip-server:7080
dan ikuti panduan berikut:
Klik fitur Virtual Hosts > Add
Summary
Isi konfigurasi di bagian ini saja, selaku contoh, saya kasih contoh nama Virtual Hostnya : idnetter.com
Virtual Host Name | idnetter.com |
Virtual Host Root | $SERVER_ROOT/idnetter.com |
Config File | $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf |
Notes | Not Set |
Follow Symbolic Link | Yes |
Enable Scripts/ExtApps | Yes |
Restrained | Yes |
Max Keep-Alive Requests | 10 |
Smart Keep-Alive | Yes |
External App Set UID Mode | DocRoot UID |
Simpan.
Setelah disimpan Sahabat akan mendapati konfigurasi baru dengan nama idnetter.com. Klik Virtual Host idnetter.com tersebut, kita akan mengerjakan konfigurasi selengkapnya. seketika ke bagian General.
General
Document Root | $SERVER_ROOT/$VH_NAME/html |
Domain Name | idnetter.com |
Domain Aliases | www.idnetter.com |
Administrator Email | support@idnetter.com |
Enable Compression | Yes |
Enable GeoLocation Lookup | Not Set |
Use Server Index Files | Yes |
Index Files | index.php, index.html |
Auto Index | Not Set |
Auto Index URI | Not Set |
Enable Expires | Yes |
Expires Default | A604800 |
Expires By Type: image/*=A604800, text/css=A604800, application/x-javascript=A604800, application/javascript=A604800, font/*=A604800, application/x-font-ttf=A604800
Lainnya biarkan default
Logs
Use Server’s Log | Yes |
File Name | $VH_ROOT/logs/error_log |
Log Level | ERROR |
Rolling Size (bytes) | 10M |
Log Control | Own Log File |
File Name | $VH_ROOT/logs/access_log |
Piped Logger | Not Set |
Log Format | Not Set |
Log Headers | Referrer UserAgent Host None |
Rolling Size (bytes) | 10M |
Keep Days | 3 |
Bytes log | Not Set |
Compress Archive | No |
Security
Allowed List |
* |
Denied List |
Not Set |
External App
Bikin baru, pilih LiteSpeed API App, saya memakai PHP7.3 jadi sesuaikan saja
Name | lsphp73 |
Address | uds://tmp/lshttpd/lsphp73.sock |
Notes | Not Set |
Max Connections | 35 |
Environment | PHP_LSAPI_CHILDREN=35 |
Initial Request Timeout (secs) | 60 |
Retry Timeout (secs) | 0 |
Persistent Connection | Yes |
Connection Keep-Alive Timeout | Not Set |
Response Buffering | No |
Start By Server | Yes (Through CGI Daemon) |
Command | $SERVER_ROOT/lsphp73/bin/lsphp |
Back Log | 100 |
Instances | 1 |
Script Handler
Suffix * | php |
LiteSpeed SAPI
|
|
[VHost Level]: lsphp73 |
Rewrite
Enable Rewrite | Yes |
Auto Load from .htaccess | Yes |
Log Level | Not Set |
Module
Module : Cache
Module Parameters: isi dengan parameter berikut
enableCache 0
enablePrivateCache 0
checkPublicCache 1
checkPrivateCache 1
qsCache 1
reqCookieCache 1
ignoreReqCacheCtrl 1
ignoreRespCacheCtrl 0
respCookieCache 1
expireInSeconds 3600
privateExpireInSeconds 3600
maxStaleAge 200
maxCacheObjSize 10000000
storagepath cachedata
noCacheDomain
noCacheUrl
no-vary 0
addEtag 0
Enable Module: Yes
Setelah selesai membangun konfigurasi VirtualHost berikutnya menambahkan ke Listeners
Listeners
Klik fitur Listeners > kemudian Add, contoh saya bikin dengan nama http (namanya bebas ini hanya contoh)
Listener Name | http |
IP Address | ANY |
Port | 80 |
Binding | Not Set |
Secure | No |
Notes | Not Set |
Kalau ingin HTTPS tinggal bikin Listener baru lagi dengan Port 443 dan Secure: Yes kemudian di konfigurasi SSLnya dimasukkan sertifikat SSLnya. (mungkin lain kali saya ketik tutornya).
Setelah disimpan, Klik Listener yang baru saja dikerjakan tersebut, yaitu http. Nah di bawahnya ada fitur Virtual Host Mappings.
Tambah Virtual host mapping
Virtual Host * | http |
Domian * | idnetter.com, www.idnetter.com |
Restart LiteSpeed, upload file web di pada direktori /usr/local/lsws/idnetter.com/html
Web Sahabat lambat? coba LiteSpeed – Jasa setup OpenLiteSpeed/LiteSpeed Enterprise dan LSCache hubungi segera WhatsApp : 081235008433 free migrasi dari Apache/Nginx bagi 1 domain.
Sumber https://idnetter.com