Skip to content

Instantly share code, notes, and snippets.

@JarenGlover
Last active August 29, 2015 14:12
Show Gist options
  • Save JarenGlover/b8b34d80719a1b88b3cb to your computer and use it in GitHub Desktop.
Save JarenGlover/b8b34d80719a1b88b3cb to your computer and use it in GitHub Desktop.
Nginx - Serving Static Files at Root
server {
listen IP:PORT;
server_name .resume.jarenglover.com;
access_log /path/to/logs/resume-access.log default_uri; # <- "default_ui" is a parameter for customize Nginx logs
error_log /path/to/logs/resume-error.log;
index /Resume.pdf; #this sets the index location of what file will be servered
root /path/to/resume/; # root folder for this server block
location / {
# A trailing slash tells nginx that it should look for a directory, not a file.
try_files $uri/ =404; # if not found then send 404
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment