Skip to content

Instantly share code, notes, and snippets.

@kyledrake
Last active December 18, 2015 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyledrake/5696630 to your computer and use it in GitHub Desktop.
Save kyledrake/5696630 to your computer and use it in GitHub Desktop.
How do I make try_files work here..
# So, the idea here is to take USERNAME.neocities.org, and have it serve
# from /home/web/neocities/public/sites/USERNAME/REQUESTED_FILENAME
# When I try to use it, I get in error.log:
# invalid number of arguments in "try_files" directive in /etc/nginx/sites-enabled/neocities:5
server {
root /home/web/neocities/public/sites;
server_name neocities.org www.neocities.org ~^(?<subdomain>.+)\.neocities.org$;
try_files $subdomain/$request_filename;
# location / {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
# proxy_max_temp_file_size 0;
#
# proxy_pass http://127.0.0.1:20000;
# break;
# }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment