Skip to content

Instantly share code, notes, and snippets.

@samueleaton
Created August 21, 2018 22:47
Show Gist options
  • Save samueleaton/ab5c6472e27a3a9c018f40271c5a26d9 to your computer and use it in GitHub Desktop.
Save samueleaton/ab5c6472e27a3a9c018f40271c5a26d9 to your computer and use it in GitHub Desktop.
# Follow guide here:
# https://www.netguru.co/codestories/nginx-tutorial-performance
location /api {
# proxy here
#
# Make all proxy request start with a certain path (ie. /api) so they are quicker and
# we don't have to see if it matches a static asset.
#
# so instead of "http://example.com/users/sam" and NGINX checking if there
# is /users/sam.html and /users/sam/index.html, we change it to
# http://example.com/api/users/sam
}
worker_process auto; # http://nginx.org/en/docs/ngx_core_module.html#worker_processes
worker_connections 1024;
worker_rlimit_nofile 2048;
location / {
# static files
sendfile on;
tcp_nopush on;
tcp_nodelay on;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment