[MacPorts] #54194: nginx+launchd doesn't open port without -g
MacPorts
noreply at macports.org
Thu May 18 22:10:39 UTC 2017
#54194: nginx+launchd doesn't open port without -g
-----------------------+-------------------
Reporter: essandess | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: nginx
-----------------------+-------------------
{{{
sudo port load nginx
}}}
doesn't open the port specified in the {{{nginx.conf}}} configuration
because of an issue with launchd.
This issue is widely known, e.g.,
http://wiki.summercode.com/running_homebrewed_nginx_with_sudo_on_mac_os_x
The way to get nginx to work with launchd is to add the {{{-g "daemon
off;"}}} option in the plist.
Here is a working launchd plist for nginx:
{{{
<?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>Label</key><string>org.macports.nginx</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/daemondo</string>
<string>--label=nginx</string>
<string>--start-cmd</string>
<string>/opt/local/sbin/nginx</string>
<string>-g</string>
<string>"daemon off;"</string>
<string>;</string>
<string>--pid=fileauto</string>
<string>--pidfile</string>
<string>/opt/local/var/run/nginx/nginx.pid</string>
</array>
<key>Disabled</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>
}}}
--
Ticket URL: <https://trac.macports.org/ticket/54194>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list