LoginSignup
1
2

More than 5 years have passed since last update.

How to Install Lighttpd for Mac

Last updated at Posted at 2012-06-14

昨日書いたJSONPのネタを検証するためにローカル環境にlighttpdを入れたのでその手順です。
昨日書いたネタはこちらJSONPとJSON

私の環境はMacなのでMacPortでインストールします。

$sudo port install lighttpd

$ pwd
/opt/local/etc/lighttpd

$ ls -ltr
total 64
-rw-r--r--   1 root  admin   3235  5 11 12:22 modules.conf.default
-rw-r--r--   1 root  admin   3235  5 11 12:22 modules.conf
-rw-r--r--   1 root  admin  10918  5 11 12:22 lighttpd.conf.default
-rw-r--r--   1 root  admin  10918  5 11 12:22 lighttpd.conf
drwxr-xr-x  50 root  admin   1700  6 13 22:59 conf.d

$sudo mkdir /etc/lighttpd/

$sudo ln -s lighttpd.conf /etc/lighttpd

以下のように lighttpd.confを修正

$cd /opt/local/etc/lighttpd

$diff lighttpd.conf lighttpd.conf.default

88c88
< server.port = 9999
---
> server.port = 80
98c98
< server.bind = "localhost"
---
> #server.bind = "localhost"
191c191
< #server.network-backend = "linux-sendfile"
---
> server.network-backend = "linux-sendfile"
ytakata:lighttpd TakataYasushi$ 

起動の方法

$lighttpd -f /opt/local/etc/lighttpd/lighttpd.conf

/opt/local/www/htdocsにおかれたファイルにアクセスされる

//シャットダウン
kill -3 [PID]
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2