Created
May 24, 2018 19:14
-
-
Save LetItRock/86a820fddb18afb6c7c6fc428c64e19c to your computer and use it in GitHub Desktop.
NGINX - prod
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
worker_processes 1; | |
daemon off; | |
error_log /home/vcap/app/nginx/logs/error.log; | |
events { worker_connections 1024; } | |
http { | |
charset utf-8; | |
log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent' | |
' ########## BEGINNING OF HEADER LOG ########## ' | |
' "$http_iv_user" ' | |
' "$http_requestHeaderName" '; | |
access_log /home/vcap/app/nginx/logs/access.log cloudfoundry; | |
default_type application/octet-stream; | |
include mime.types; | |
sendfile on; | |
port_in_redirect off; | |
server_tokens off; | |
resolver 10.35.35.35 ipv6=off; | |
proxy_read_timeout 180s; | |
client_max_body_size 50m; | |
server { | |
listen 8080; | |
server_name localhost; | |
root /home/vcap/app/public; | |
client_max_body_size 50m; | |
location / { | |
try_files $uri $uri/ /index.html; | |
client_max_body_size 50m; | |
} | |
location ~ /api/(.*) { | |
set $my_target #INIECTED_SERVER_URL#/$1$is_args$args; | |
proxy_pass $my_target; | |
client_max_body_size 50m; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment