Proxy/caching with Apache and index.html files

MattWard nginx-forum at nginx.us
Tue Aug 10 18:55:21 MSD 2010


Hi all,

I've got an nginx frontend/apache backend setup with nginx using
proxy_pass to pass requests for location / to my Apache server on
localhost:8080. I've got a location setup to catch css/js/images/html
etc. and serve them statically via nginx (fairly standard I believe).

My question is, this works for everything (including html files, which I
want served statically via nginx) apart from default index.html files
that are matched by /. If I were to go to domain.com/index.html for
example, this would be served by nginx, but if I go to domain.com/ and
the default file is an index.html file I want it served by nginx (as
opposed to a default index.php file which would still be passed through
to Apache). What config do I need to get nginx to recognise this special
case?

Matt.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,118322,118322#msg-118322




More information about the nginx mailing list