MacOS 开机自启动 NGINX和PHP

阅读更多

1. 开机启动nginx:在 /Library/LaunchDaemons/ 目录新建 org.macports.nginx.plist 文件:





     Label
     org.macports.nginx
     ProgramArguments
     
         /usr/local/bin/nginx
     
     KeepAlive
     

 加载配置:launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist

2. 开机启动php:
在 /Library/LaunchDaemons/ 目录新建 org.php.php-fpm.plist 文件:





     Label
     org.php.php-fpm
     ProgramArguments
     
         /usr/sbin/php-fpm
     
     KeepAlive
     

加载配置:launchctl load -w /Library/LaunchDaemons/org.php.php-fpm.plist

你可能感兴趣的:(MacOS 开机自启动 NGINX和PHP)