:: VirtualHost on Lighttpd

:: What is
please take a look at this.

:: Compile and install Lighttpd
please take a look at this.

:: Configure VirtualHost work directory
[ linux:~ ] # mkdir -p /srv/www/vhosts/{www.domain-one.org,www.domain-two.org}/htdocs
[ linux:~ ] # mkdir -p /srv/www/vhosts/{www.domain-one.org,www.domain-two.org}/logs

:: Configure Lighttp.conf for VirtualHost
[ linux:~ ] # vi /usr/local/etc/lighttpd.conf
#
# enable mod_simple_vhost and other modules
#
server.modules = (
"mod_simple_vhost",
etc... )

#
# Add this configuration for virtual domain on lighttpd
#
# www.domain-one.org
#
$HTTP[ "host" ] =~ "domain-one\.org" {
server.document-root = "/srv/www/vhosts/www.domain-one.org/htdocs"
accesslog.filename = "/srv/www/vhosts/www.domain-one.org/logs/access.log"
}
#
# www.domain-two.org
#
$HTTP[ "host" ] =~ "domain-two\.org" {
server.document-root = "/srv/www/vhosts/www.domain-two.org/htdocs"
accesslog.filename = "/srv/www/vhosts/www.domain-two.org/logs/access.log"
}

:: Starting Lighttpd service
[ linux: ~] # /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf 

:: Links
+ GoogleLinux
+ CyberCiti

0 komentar:

Post a Comment

:: Cheap Web Hosting :: ~ only from Rp. 900/mo; 250Mb/mo of Bandwidth ~ :: Web Hosting Murah Meriah :: ~ mulai dari Rp. 900/bln; Bandwidth 250Mb/bln ~