-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support templating of inlcude directives in nginx.conf
Co-authored-by: Timothy Hitchener <thitchener@vmware.com> Co-authored-by: Andy Brown <browna@vmware.com> - Varify executable follows include directives to parse included config files
- Loading branch information
Showing
102 changed files
with
3,094 additions
and
1,790 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
nginx: | ||
version: stable | ||
plaintext_env_vars: | ||
- "OVERRIDE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
daemon off; | ||
|
||
error_log stderr; | ||
events { worker_connections 1024; } | ||
|
||
http { | ||
charset utf-8; | ||
log_format cloudfoundry 'NginxLog "$request" $status $body_bytes_sent'; | ||
access_log /dev/stdout cloudfoundry; | ||
default_type application/octet-stream; | ||
include mime.types; | ||
sendfile on; | ||
|
||
tcp_nopush on; | ||
keepalive_timeout 30; | ||
port_in_redirect off; # Ensure that redirects don't include the internal container PORT - 8080 | ||
|
||
server { | ||
listen {{port}}; | ||
resolver {{nameservers}}; | ||
root public; | ||
index index.html index.htm Default.htm; | ||
|
||
# configuration endpoint | ||
location /test { | ||
default_type application/json; | ||
|
||
set $override {{env "OVERRIDE"}}; | ||
|
||
if ($override != '') { | ||
return 200 {{env "OVERRIDE"}}; | ||
} | ||
|
||
return 200 "No overrides happening!"; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
types { | ||
text/html html htm shtml; | ||
text/css css; | ||
text/xml xml; | ||
image/gif gif; | ||
image/jpeg jpeg jpg; | ||
application/x-javascript js; | ||
application/atom+xml atom; | ||
application/rss+xml rss; | ||
font/ttf ttf; | ||
font/woff woff; | ||
font/woff2 woff2; | ||
text/mathml mml; | ||
text/plain txt; | ||
text/vnd.sun.j2me.app-descriptor jad; | ||
text/vnd.wap.wml wml; | ||
text/x-component htc; | ||
text/cache-manifest manifest; | ||
image/png png; | ||
image/tiff tif tiff; | ||
image/vnd.wap.wbmp wbmp; | ||
image/x-icon ico; | ||
image/x-jng jng; | ||
image/x-ms-bmp bmp; | ||
image/svg+xml svg svgz; | ||
image/webp webp; | ||
application/java-archive jar war ear; | ||
application/mac-binhex40 hqx; | ||
application/msword doc; | ||
application/pdf pdf; | ||
application/postscript ps eps ai; | ||
application/rtf rtf; | ||
application/vnd.ms-excel xls; | ||
application/vnd.ms-powerpoint ppt; | ||
application/vnd.wap.wmlc wmlc; | ||
application/vnd.google-earth.kml+xml kml; | ||
application/vnd.google-earth.kmz kmz; | ||
application/x-7z-compressed 7z; | ||
application/x-cocoa cco; | ||
application/x-java-archive-diff jardiff; | ||
application/x-java-jnlp-file jnlp; | ||
application/x-makeself run; | ||
application/x-perl pl pm; | ||
application/x-pilot prc pdb; | ||
application/x-rar-compressed rar; | ||
application/x-redhat-package-manager rpm; | ||
application/x-sea sea; | ||
application/x-shockwave-flash swf; | ||
application/x-stuffit sit; | ||
application/x-tcl tcl tk; | ||
application/x-x509-ca-cert der pem crt; | ||
application/x-xpinstall xpi; | ||
application/xhtml+xml xhtml; | ||
application/zip zip; | ||
application/octet-stream bin exe dll; | ||
application/octet-stream deb; | ||
application/octet-stream dmg; | ||
application/octet-stream eot; | ||
application/octet-stream iso img; | ||
application/octet-stream msi msp msm; | ||
application/json json; | ||
audio/midi mid midi kar; | ||
audio/mpeg mp3; | ||
audio/ogg ogg; | ||
audio/x-m4a m4a; | ||
audio/x-realaudio ra; | ||
video/3gpp 3gpp 3gp; | ||
video/mp4 mp4; | ||
video/mpeg mpeg mpg; | ||
video/quicktime mov; | ||
video/webm webm; | ||
video/x-flv flv; | ||
video/x-m4v m4v; | ||
video/x-mng mng; | ||
video/x-ms-asf asx asf; | ||
video/x-ms-wmv wmv; | ||
video/x-msvideo avi; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
worker_processes 1; | ||
include custom.conf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>Exciting Content</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
worker_processes 1; | ||
daemon off; | ||
|
||
error_log stderr; | ||
events { worker_connections 1024; } | ||
|
||
http { | ||
charset utf-8; | ||
log_format cloudfoundry 'NginxLog "$request" $status $body_bytes_sent'; | ||
access_log /dev/stdout cloudfoundry; | ||
default_type application/octet-stream; | ||
include mime.types; | ||
sendfile on; | ||
|
||
tcp_nopush on; | ||
keepalive_timeout 30; | ||
port_in_redirect off; # Ensure that redirects don't include the internal container PORT - 8080 | ||
|
||
server { | ||
listen {{port}}; | ||
root public; | ||
index index.html index.htm Default.htm; | ||
|
||
# configuration endpoint | ||
location /test { | ||
default_type application/json; | ||
|
||
set $override "{{env "OVERRIDE"}}"; | ||
|
||
if ($override != '') { | ||
return 200 "{{env "OVERRIDE"}}"; | ||
} | ||
|
||
return 200 "No overrides happening! \"abc\""; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>Exciting Content</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "abcd": 12345 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.