Last active
August 29, 2015 14:12
-
-
Save JarenGlover/b8b34d80719a1b88b3cb to your computer and use it in GitHub Desktop.
Nginx - Serving Static Files at Root
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
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