Requirement on Mac OS X:
Xcode 1
2
3
4
5
6
7
8
9 export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin"
10
11 mkdir -p ~/Desktop/Nginx
12 cd ~/Desktop/Nginx
13
14 curl -L -O http://sysoev.ru/nginx/nginx-0.7.2.tar.gz
15 tar -xzf nginx-0.7.2.tar.gz
16
17 curl -L -O http://downloads.sourceforge.net/pcre/pcre-7.7.tar.gz
18 tar -xzf pcre-7.7.tar.gz
19
20 cd ~/Desktop/Nginx/nginx-0.7.2
21 ./configure --help
22 ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin --with-debug --with-http_ssl_module --with-pcre=../pcre-7.7
23 make
24 sudo make install
25
26
27 which nginx
28 otool -L /usr/local/sbin/nginx
29 open /usr/local/nginx
30 open -e /usr/local/nginx/conf/nginx.conf
31
32 nginx -v
33 nginx -V
34 sudo nginx
35 sudo nginx -t
36
37 open http://localhost:80
38 open http://localhost:80/50x.html
39
40 sudo nano /usr/local/nginx/conf/nginx.conf
41
42
43 sudo kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
44
45
46 sudo kill -15 $(ps -auxxx | egrep "[n]ginx.*master" | awk '{ print $2 }') 2>/dev/null