Help us understand the problem. What is going on with this article?

How to Install Lighttpd for Mac

More than 5 years have passed since last update.

昨日書いた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]
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away