Олег Коссой (kossoy) wrote,
Олег Коссой
kossoy

Nginx on Mac OS X

Modified from Nginx on Mac OS X Snow Leopard in 2 Minutes post.

#!/usr/bin/env bash

PCRE_DIR="pcre-8.12"
PCRE_LINK="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$PCRE_DIR.tar.gz"

NGNIX_DIR="nginx-0.8.54"
NGNIX_LINK="http://nginx.org/download/$NGNIX_DIR.tar.gz"

## DOWNLOADS
curl -OL h $PCRE_LINK > $PCRE_DIR.tar.gz
curl -OL h http://nginx.org/download/$NGNIX_DIR.tar.gz > $NGNIX_DIR.tar.gz

## Install PCRE
tar xvzf $PCRE_DIR.tar.gz
cd $PCRE_DIR
./configure --prefix=/usr/local
make
sudo make install
cd ..

## Install Nginx
tar xvzf $NGNIX_DIR.tar.gz
cd $NGNIX_DIR
./configure --prefix=/usr/local --with-http_ssl_module
make
sudo make install

To run:

sudo /usr/local/sbin/nginx -p /usr/local/

To stop

sudo /usr/local/sbin/nginx -s stop
comment in blog.kossoy.com
Tags: computers
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments