-
-
Save tylerflint/bdf522e52ab31721dcf0 to your computer and use it in GitHub Desktop.
nanobox simple nginx config
This file contains hidden or 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
# generate nginx config | |
cat > "$(payload 'build_dir')/etc/nginx/nginx.conf" <<END | |
daemon off; | |
worker_processes 1; | |
error_log /data/var/log/nginx/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /data/etc/nginx/mime.types; | |
default_type application/octet-stream; | |
# access_log /data/var/log/nginx/access.log main; | |
keepalive_timeout 65; | |
gzip on; | |
server { | |
listen $(payload 'port'); | |
server_name localhost; | |
location / { | |
root $(payload 'live_dir'); | |
index index.html; | |
} | |
#error_page 404 /404.html; | |
# redirect server error pages to the static page /50x.html | |
# | |
# error_page 500 502 503 504 /50x.html; | |
# location = /50x.html { | |
# root share/examples/nginx/html; | |
# } | |
} | |
} | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks