Jun
23
Compile & install Nginx web server
Posted (Amit) in Ruby on Rails on 23-06-2008
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # See: # - http://en.wikipedia.org/wiki/Nginx # - http://wiki.codemongers.com/NginxGettingStarted # - http://wiki.codemongers.com/NginxInstallOptions # - http://wiki.codemongers.com/NginxCommandLine # - http://wiki.codemongers.com/NginxConfiguration export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin" mkdir -p ~/Desktop/Nginx cd ~/Desktop/Nginx curl -L -O http://sysoev.ru/nginx/nginx-0.7.2.tar.gz tar -xzf nginx-0.7.2.tar.gz curl -L -O http://downloads.sourceforge.net/pcre/pcre-7.7.tar.gz tar -xzf pcre-7.7.tar.gz cd ~/Desktop/Nginx/nginx-0.7.2 ./configure --help ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin --with-debug --with-http_ssl_module --with-pcre=../pcre-7.7 make sudo make install which nginx otool -L /usr/local/sbin/nginx open /usr/local/nginx open -e /usr/local/nginx/conf/nginx.conf nginx -v nginx -V sudo nginx # start server sudo nginx -t open http://localhost:80 open http://localhost:80/50x.html sudo nano /usr/local/nginx/conf/nginx.conf # editing ... server { listen 8080; ... # reload configuration sudo kill -HUP `cat /usr/local/nginx/logs/nginx.pid` # stop server sudo kill -15 $(ps -auxxx | egrep "[n]ginx.*master" | awk '{ print $2 }') 2>/dev/null |















