nginx rule to serve root
Posted
by jney
on Stack Overflow
See other posts from Stack Overflow
or by jney
Published on 2010-04-15T21:33:22Z
Indexed on
2010/04/27
14:23 UTC
Read the original article
Hit count: 218
nginx
I would like to nginx to serve a static file from website root ( : http://localhost:8080/ ) but it serves my proxy pass; it serves "/" rule instead of "= /".
Here is what my nginx config look like :
listen 0.0.0.0:8080;
server_name localhost;
set $static_dir /path/to/static/
location = / {
# got index.html in /path/to/static/html/index.html
root $static_dir/html/;
}
location / {
# ...
proxy_pass http://app_cluster_1/;
}
Did i miss something ?
© Stack Overflow or respective owner