can i run nginx caching and http server on same box?(newbie)

2013-09-06 Thread anco
can i run nginx caching and http server on same box? can i set caching per directory and/or per server block? how can i check what is actually being cached? logs? should i place php scripts outside root location? disclosure: newbie here aiming to ask the right questions(i have lots of them, the

Using if statements in a location block with set

2013-09-06 Thread justin
Is the following going to work as expected: location /v1/users { rewrite ^/users/(.*)/accounts$ /v1/users/$1/accounts break; if ($server_name = 'js.mydomain.com') { set $backend "api.mydomain.com"; } if ($server_name = 'js-s.mydomain.com') {

Best way to protect an http service with nginx (possibly encryption?)

2013-09-06 Thread doug livesey
Hi -- I'm an nginx newbie who is looking to maybe use nginx to provide security for an HTTP service that previously ran in a trusted environment, but that now needs to run on the open web. I was thinking of having nginx listen on an arbitrary port, authenticate requests to the service on that port,

Re: Return file when it's in cache/check if file exists in cache

2013-09-06 Thread ixos
Ok, maybe not so beautiful solution but upstream can be used with one server makred as down. http { upstream backend-jail { server 0.0.0.0 down; } server { listen 80; underscores_in_headers on; recursive_error_pages on; error_page 597 = @jail; location / {