&tag(Homebrew/apache); *目次 [#k3bbf3df] #contents *参考情報 [#v5a49fd8] -[[Homebrew]] *インストール [#yb2943dd] -tapが必要 #pre{{ $ brew tap homebrew/dupes $ brew install httpd }} -次のようなインストラクションが表示される #pre{{ You should reload httpd: launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist launchctl load ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist }} *設定ファイルなど [#s415330a] -/usr/local/etc/apache2/httpd.conf を編集する。 *起動 [#t209dc83] -デフォルト設定のポート80で動かす場合root権限が必要。この場合、 sudo launchctl load -w /Library/LaunchAgents/homebrew.mxcl.httpd.plist -一般ユーザーで動かす場合 launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist *未確認情報[#i738145d] **brew servicesって何? [#icb13c46] -以下のコマンドを実行すると/Library/LaunchDaemonsにplistが作られる。 sudo brew services start httpd -/Library/LaunchAgents/homebrew.mxcl.httpd.plistが作られる。これを使えばroot起動が簡単? sudo launchctl load -w /Library/LaunchAgents/homebrew.mxcl.httpd.plist **run、logディレクトリが作られない? [#k662a466] ※[[httpd log and run directories not being created · Issue #119 · Homebrew/homebrew-dupes · GitHub:https://github.com/Homebrew/homebrew-dupes/issues/119]]に、run、logディレクトリが作られず起動できないエラーが報告されている。手動でディレクトリを作らないとだめかも(と思ったけど、rootで起動すれば大丈夫かも。場所は/usr/local/var/apache2/log)。