nginx: fix config and audit warnings.
Closes Homebrew/homebrew#40983. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
7bafb10dda
commit
ccf12f767d
1 changed files with 7 additions and 4 deletions
|
@ -35,7 +35,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/*;" }
|
||||
inreplace "conf/nginx.conf", " #}\n\n}", " #}\n include servers/*;\n}"
|
||||
|
||||
pcre = Formula["pcre"]
|
||||
openssl = Formula["openssl"]
|
||||
|
@ -86,9 +86,12 @@ class Nginx < Formula
|
|||
system "./configure", *args
|
||||
end
|
||||
|
||||
system "make"
|
||||
system "make", "install"
|
||||
man8.install "objs/nginx.8"
|
||||
if build.head?
|
||||
man8.install "docs/man/nginx.8"
|
||||
else
|
||||
man8.install "man/nginx.8"
|
||||
end
|
||||
|
||||
(etc/"nginx/servers").mkpath
|
||||
(var/"run/nginx").mkpath
|
||||
|
@ -136,7 +139,7 @@ class Nginx < Formula
|
|||
|
||||
nginx will load all files in #{etc}/nginx/servers/.
|
||||
EOS
|
||||
s << passenger_caveats if build.with? "passenger"
|
||||
s << "\n" << passenger_caveats if build.with? "passenger"
|
||||
s
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue