From 592dac3599fe042bf5da55930bb03113063bc9fa Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 16 Apr 2015 18:15:02 -0700 Subject: nginx: load configuration put in etc/servers. I've heard this requested a few times. Closes #38729. Signed-off-by: Mike McQuaid --- Library/Formula/nginx.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb index 660dd4e3f..491d13ef6 100644 --- a/Library/Formula/nginx.rb +++ b/Library/Formula/nginx.rb @@ -34,6 +34,7 @@ class Nginx < Formula def install # Changes default port to 8080 inreplace "conf/nginx.conf", "listen 80;", "listen 8080;" + open("conf/nginx.conf", "a") {|f| f.puts "include servers/*;" } pcre = Formula["pcre"] openssl = Formula["openssl"] @@ -78,6 +79,8 @@ class Nginx < Formula system "make" system "make", "install" man8.install "objs/nginx.8" + + (etc/"nginx/servers").mkpath (var/"run/nginx").mkpath end @@ -125,6 +128,8 @@ class Nginx < Formula The default port has been set in #{etc}/nginx/nginx.conf to 8080 so that nginx can run without sudo. + + nginx will load all files in #{etc}/nginx/servers/. EOS s << passenger_caveats if build.with? "passenger" s -- cgit v1.2.3