日期:2014-05-17  浏览次数:20521 次

Mac Lion上安装配置Nginx PHP PHP-FPM

<!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

Install Nginx And PHP-FPM On Mac Lion

安装Nginx

方法1:使用brew.

brew install nginx

按提示操作,安装完成后nginx的配置文件在/usr/local/etc/nginx/nginx.conf

启动nginx:

nginx?或者?sudo nginx

注意:若nginx的监听端口为1024以下,则需要使用sudo,否则会出现Permission denied.

停止?nginx

sudonginx s stop

自动启动

You can start nginx automatically on login running as your user with:

mkdir -p ~/Library/LaunchAgents

cp /usr/local/Cellar/nginx/1.0.8/org.nginx.nginx.plist ~/Library/La