mac os nginx startup launchd configure
Igor Sysoev
is at rambler-co.ru
Fri Aug 1 09:22:52 MSD 2008
On Fri, Aug 01, 2008 at 02:46:10AM +0200, Nanyang Zhan wrote:
> I want nginx to be started up every time my Mac os 10.5 system boots up.
> So I create a launchd file:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
> "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
> <dict>
> <key>Disabled</key>
> <false/>
> <key>Label</key>
> <string>com.zhan.nginx</string>
> <key>OnDemand</key>
> <false/>
> <key>ProgramArguments</key>
> <array>
> <string>/opt/local/sbin/nginx</string>
> </array>
> <key>RunAtLoad</key>
> <true/>
> </dict>
> </plist>
> It works, but inside nginx error log, I see:
> 2008/08/01 08:24:50 [emerg] 244#0: bind() to 0.0.0.0:80 failed (48:
> Address already in use)
Looking in Apache's plist, I see
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/httpd</string>
<string>-D</string>
<string>FOREGROUND</string>
</array>
Probably you need to set "daemon off;" in nginx.conf.
BTW, upgrade to 0.7.8 if you are using case insensitive HFS+,
and do not use UTF-8 strings in locations.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list