wiki:jazz/09-08-19

Version 3 (modified by jazz, 15 years ago) (diff)

--

2009-08-19

Lighttp mod_simple_vhost

  • [緣起] 平常慣用的是 apache / apache2 ,因專案需求想知道 lighttpd 如何設定 vhost
  • [參考] mod_simple_vhost
  • STEP 1: 修改 /etc/lighttpd/conf-available/10-simple-vhost.conf 設定檔
    • 10-simple-vhost.conf

      old new  
      1111simple-vhost.document-root       = "/html/"
      1212
      1313## the default host if no host is sent
      14 simple-vhost.default-host        = "www.example.com"
       14simple-vhost.default-host        = "classcloud.org"
       15
       16##
       17$HTTP["host"] == "f-motif.classcloud.org" {
       18           server.document-root = "/var/www/f-motif/"
       19}
  • STEP 2: 啟動 mod_simple_vhost
    $ sudo /usr/sbin/lighttpd-enable-mod simple-vhost
    $ sudo /etc/init.d/lighttpd force-reload