Compiling Nginx on OS X Leopard in 5 minutes
I went to compile Nginx on my laptop this evening, and couldn't find a how-to for Leopard. Well at least not on the first page or 2 of search results.
Danger Weary Traveller!
I happen to be running OS X version 10.5.4 build 9E17.
If you are running something different, these directions may fail. In fact, for all I know your computer may actually blow-up. Yes, as in burst into flames and melt into a smoldering heap of plastic mush. Compiling stuff really is that scary. Hide the children. Don eye protection.
False Advertising DisclaimerWhether it will really take you 5 minutes or not probably depends on your processor and whether or not your copy & paste skills are up to par. But seriously, it took me longer to write this post than to do the actual install.
Related Sites
Official Nginx Site
Nginx Wiki
Official PCRE Site
Satisfy PCRE Dependency
Nginx requires PCRE to be installed. PCRE stands for Prank Calling Really is Evil, or something like that. But whatever it is, Nginx thinks it just can't live without it.
$ sudo mkdir -p /usr/local/src
$ cd /usr/local/src
$ curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.7.tar.gz
$ tar xvfz pcre-7.7.tar.gz
$ cd pcre-7.7
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ..
Install Nginx
$ curl -O http://sysoev.ru/nginx/nginx-0.6.32.tar.gz
$ tar xvfz nginx-0.6.32.tar.gz
$ cd nginx-0.6.32
$ ./configure --prefix=/usr/local --with-http_ssl_module
$ make
$ sudo make install
Now if you ask:
$ which nginx
You should receive the answer /usr/local/sbin/nginx
If not, you probably need to add /usr/local to your PATH.
Nginx will setup a default index.html file in /usr/local/html. The default nginx.conf file will be in /usr/local/conf and will be set to serve this index.html file. To start Nginx:
$ sudo nginx
And finally, to see the fruits of your labors open your favorite browser and navigate to http://localhost
Next you get to configure Nginx to serve up whatever it is you want to serve. But that search query will already provide you with many, many results...

Danger Weary Traveller!
I happen to be running OS X version 10.5.4 build 9E17.
If you are running something different, these directions may fail. In fact, for all I know your computer may actually blow-up. Yes, as in burst into flames and melt into a smoldering heap of plastic mush. Compiling stuff really is that scary. Hide the children. Don eye protection.
False Advertising DisclaimerWhether it will really take you 5 minutes or not probably depends on your processor and whether or not your copy & paste skills are up to par. But seriously, it took me longer to write this post than to do the actual install.
Related Sites
Official Nginx Site
Nginx Wiki
Official PCRE Site
Satisfy PCRE Dependency
Nginx requires PCRE to be installed. PCRE stands for Prank Calling Really is Evil, or something like that. But whatever it is, Nginx thinks it just can't live without it.
$ sudo mkdir -p /usr/local/src
$ cd /usr/local/src
$ curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.7.tar.gz
$ tar xvfz pcre-7.7.tar.gz
$ cd pcre-7.7
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ..
Install Nginx
$ curl -O http://sysoev.ru/nginx/nginx-0.6.32.tar.gz
$ tar xvfz nginx-0.6.32.tar.gz
$ cd nginx-0.6.32
$ ./configure --prefix=/usr/local --with-http_ssl_module
$ make
$ sudo make install
Now if you ask:
$ which nginx
You should receive the answer /usr/local/sbin/nginx
If not, you probably need to add /usr/local to your PATH.
Nginx will setup a default index.html file in /usr/local/html. The default nginx.conf file will be in /usr/local/conf and will be set to serve this index.html file. To start Nginx:
$ sudo nginx
And finally, to see the fruits of your labors open your favorite browser and navigate to http://localhost
Next you get to configure Nginx to serve up whatever it is you want to serve. But that search query will already provide you with many, many results...
More From This Author
About the Author
Celebrity Spotlight
Top Entertainment Articles
|
Lindsay Lohan's Assistant Worries Lindsay Will Kill Herself
In yet another recording released by Lindsay's dad Michael, her assistant Jenni Muro says, "I am trying to save your daughter's life every day." Wait, Lindsay Lohan has an assistant?
|
|
Twilight’s Christian Serratos Gets Naked For PETA
Serratos poses naked for the 'I'd Rather Go Naked Than Wear Fur' campaign.
|
|
100 Best Bikini Bodies
Click here for the best way to spend 10 minutes.
|
Popular Entertainment Zines




