Welcome! Log In Create A New Profile

Advanced

Re: Static homepage at root

Alejandro Mery
April 24, 2010 06:08AM
On Sat, Apr 24, 2010 at 03:01, yourenew <nginx-forum@nginx.us> wrote:
> I'm trying to host a static homepage, but send all other queries on to the proxy (which leads to django), but I'm having trouble getting it to work.  It seems to ignore the first location directive.  Are these correctly configured?  (I'm running nginx 0.6.35 and Ubuntu 9.04)
>

that is a very common case, an static overlay in front an application.
The right solution is to use
the try_files directive <http://wiki.nginx.org/NginxHttpCoreModule#try_files>

try something like:

location = / {
root /var/www/aya/htdocs/html/;
try_files $uri $uri/index.html @proxy;
}

location @proxy {
proxy_pass http://aya;
include proxy.conf;
}

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Static homepage at root

yourenew April 23, 2010 08:25PM

Re: Static homepage at root

Maxim Dounin April 24, 2010 05:18AM

Re: Static homepage at root

Alejandro Mery April 24, 2010 06:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready