Skip to content

Instantly share code, notes, and snippets.

@carlessanagustin
Last active August 29, 2015 14:16
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 carlessanagustin/34152f193e26b9468a7f to your computer and use it in GitHub Desktop.
Save carlessanagustin/34152f193e26b9468a7f to your computer and use it in GitHub Desktop.
Nginx simplified
server {
listen 80;
charset utf-8;
server_name your-site.com www.your-site.com;
#index index.html index.htm;
# myApp at port 8010
location /myApp {
return 301 http://$host:8010$request_uri;
}
# list folder /home/user/web
location /web {
root /home/user;
try_files $uri $uri/ =404;
autoindex on;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment