Nginx Windows Proxy Cache server static content

apache-2.2nginx

Basically i am trying to setup nginx with apache but i want nginx to serve static content such as javascript, stylesheets, media files etc but i want php to be passed to apache listening on port 8080.

Using the following i can get nginx to redirect php requests to apache listening on port 8080

location ~ \.php$ {
proxy_pass         http:127.0.0.1:8080/;
}

But how can i tell nginx to serve all static data such as .css .js .flv. png .ico .gif .jpg etc.

Best Answer

Are you sure you want nginx on windows? from http://nginx.org/en/docs/windows.html:

Version of nginx for Windows uses the native Win32 API (not the Cygwin emulation layer). Only the select() connection processing method is currently used, so high performance and scalability should not be expected. Due to this and some other known issues version of nginx for Windows is considered to be a beta version.

Related Topic