Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 536fbf23ca
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 32 lines (22 sloc) 0.651 kb
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
#!/usr/bin/env bash
set -e

dir=$(pwd)
brew=$(brew --prefix)

logdir=$brew/var/log/nginx
mkdir -p $logdir

# seems like there's no other way for having a dynamic config:
echo "daemon off;
error_log $logdir/error_log;

events { worker_connections 1024; }

http {
include $brew/etc/nginx/mime.types;
access_log $logdir/access_log;
# client_body_temp_path /tmp/nginx-dir/client_body_temp;
# fastcgi_temp_path /tmp/nginx-dir/client_body_temp;
# proxy_temp_path /tmp/nginx-dir/proxy_temp;
server {
listen 3000; server_name localhost;
root $dir;
}
}" > /tmp/nginx-dir.conf

$brew/sbin/nginx -c /tmp/nginx-dir.conf
Something went wrong with that request. Please try again.