OLS: Setup Virtual Host

From OnnoWiki
Jump to navigation Jump to search

Buat Folder

sudo mkdir /usr/local/lsws/example.com/{html,logs} -p


Buka Admin OLS

http://<IPADDRESSSERVER>:7080/

Klik Virtual Hosts >

Virtual Host Name: example.com
Virtual Host Root: $SERVER_ROOT/example.com/
Config File: $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf
Follow Symbolic Link: Yes
Enable Scripts/ExtApps: Yes
Restrained: Yes
External App Set UID Mode: Server UID

Klik Virtual Hosts > choose virtual host > General > Base

Document Root: $VH_ROOT/html/
Domain Name: example.com
Enable Compression: Yes

Klik Virtual Hosts > choose virtual host > General > Index

Use Server Index Files: No
Index files: index.php, index.html, index.htm
Auto Index: No

Klik Virtual Hosts > choose virtual host > Log

Use Server’s Log: Yes
File Name: $VH_ROOT/logs/error.log
Log Level: ERROR (atau DEBUG)
Rolling Size (bytes): 10M

Klik Virtual Hosts > choose virtual host > Access Log > +

Log Control: Own Log File
File Name: $VH_ROOT/logs/access.log
Piped Logger: Not Set
Log Format: Not Set
Log Headers: Not Set
Rolling Size (bytes): 10M
Keep Days: 30
Bytes log: Not Set
Compress Archive: Yes

Klik Virtual Hosts > choose virtual host > Security > Access Control

Allowed List: *
Denied List: Not set

Klik Virtual Hosts > choose virtual host > Script Handler Definition

Suffixes: php
Handler Type: LiteSpeed SAPI
Handler Name: [Server Level]: lsphp74

Klik Virtual Hosts > choose virtual host > Rewrite > Rewrite Control

Enable Rewrite: Yes
Auto Load from .htaccess: Yes

Klik Listeners > View button against Default Listener > + Virtual Host Mappings

Virtual Host: example.com
Domains: example.com


Lakukan

Graceful restart



Buat File HTML

Buat file HTML dimasukan ke folder example.com


Sisi Client

edit

/etc/hosts

tambah

192.168.0.178   example.com