沙漠网

系统IT运维技术站

OS X 系统安装nginx开启80端口

由于OSX不允许system级以外的服务使用1024以下的端口,要开启nginx的80端口,需要以下操作:

在使用brew安装nginx以后,可以在/usr/local/opt/nginx 下找到nginx对应的plist文件,比如: homebrew.mxcl.nginx.plist

sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons

sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist 

然后重启机器就可以了。


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-BlogPHP 1.7.3

Copyright Daixh.com Rights Reserved. 京ICP备09012299号-1

联系我:home#daixh.com (#改@)