&tag(Homebrew/apache);
*目次 [#k3bbf3df]
#contents
*参考情報 [#v5a49fd8]

*インストール [#yb2943dd]
-tapが必要
#pre{{
$ brew tap Homebrew/dupes
$ brew install httpd
}}

*起動 [#t209dc83]
-/usr/local/sbin/apachectlで制御する。
-ポート80で動かす場合root権限が必要(ログインユーザーで起動するとエラーになるはず)。
 sudo /usr/local/sbin/apachectl start
-ブラウザで、http://localhost にアクセスし動いていればOK。
-[[httpd log and run directories not being created · Issue #119 · Homebrew/homebrew-dupes · GitHub:https://github.com/Homebrew/homebrew-dupes/issues/119]]に、run、logディレクトリが作られず起動できないエラーが報告されている。手動でディレクトリを作らないとだめだった。

*自動起動 [#i738145d]
-以下のコマンドを実行。
 sudo brew services start httpd
-/Library/LaunchAgents/homebrew.mxcl.httpd.plistが作られる(ログインユーザーで実行した場合~/Library/LaunchAgents/homebrew.mxcl.httpd.plistが作られる)。
 sudo launchctl load  -w /Library/LaunchAgents/homebrew.mxcl.httpd.plist


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS