2015年4月12日 星期日

nginx Web Server

use nginx as local web server, fast & lightweight

http://nginx.org

nginx installation

To install on Mac, need to use MacPorts installer system. (www.macports.org)

MacPorts will do the download, compile and install by a command line. similar to linux's apt-get

After installed MacPorts, open terminal and type the command:

sudo port -d selfupdate
 to make sure MacPorts know the latest version of nginx

sudo port install nginx
 download & install nginx


start nginx

login as su: sudo -s
and run command: nginx

html folder

for mac: /opt/local/share/nginx/html

沒有留言:

張貼留言