Why should I have a 307 redirect ?

2017-09-29 Thread Ph. Gras
Hi there, can somebody tell me why I have a 307 redirect response code when I'm turning my redirect directive to https off ? # curl -I https://www.avoirun.com HTTP/1.1 200 OK Server: nginx Date: Fri, 29 Sep 2017 21:48:40 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive X-Pingback

Re: Can the cacheloader process stay alive and keep rebuilding or updating the cache metadata?

2017-09-29 Thread Lucas Rolff
> It would help in a use-case when there are 2 NGINX processes, both working with the same cache directory. Why would you want 2 nginx processes to use the same cache directory? Explain your situation, what's your end-goal, etc. If it's no minimize the amount of origin requests, you can build

Re: Can the cacheloader process stay alive and keep rebuilding or updating the cache metadata?

2017-09-29 Thread rnmx18
Probably, I should clarify that the use-case which I described above would use the same cache-configuration for both NGINX processes - so same proxy-cache-path and proxy-cache-key specifications. Using a different cache-key would obviously create conflict in cached file path. Thanks Rajesh Poste

Re: Can the cacheloader process stay alive and keep rebuilding or updating the cache metadata?

2017-09-29 Thread rnmx18
It would help in a use-case when there are 2 NGINX processes, both working with the same cache directory. NGINX-A runs with a proxy-cache-path /disk1/cache with zone name "cacheA". NGINX-B runs with the same proxy-cache-path /disk1/cache with zone name "cacheB". When NGINX-B adds content to the

Re: Can the cacheloader process stay alive and keep rebuilding or updating the cache metadata?

2017-09-29 Thread Lucas Rolff
I can’t think of any scenario, you’d want that – care to explain why you’d like this behaviour? On 29/09/2017, 22.28, "nginx on behalf of rnmx18" wrote: Hi, As I understand, during startup, the cache loader process scans the files in the defined proxy-cache-path directories, an

Re: Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

2017-09-29 Thread rnmx18
Hi Maxim, Thanks for your inputs. I now understand that it is probably better, not to externally interfere with the contents of the cache directory assigned to NGINX. Regards Rajesh Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276611,276625#msg-276625 _

Can the cacheloader process stay alive and keep rebuilding or updating the cache metadata?

2017-09-29 Thread rnmx18
Hi, As I understand, during startup, the cache loader process scans the files in the defined proxy-cache-path directories, and builds up the in-memory-metadata. Once the metadata is built-up, the cache loader process exits. Is there any mechanism by which, this cache loader process can be made to

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread rnmx18
Hi Lucas, Thanks for that suggestion about split_clients directive. I will consider it in my evaluation. Regards Rajesh Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276612,276623#msg-276623 ___ nginx mailing list nginx@nginx.org http://m

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread Lucas Rolff
> In this model, only the originally cached file at /disk1/cache can be served > properly by the NGINX-proxy. You can balance disk usage using split_clients module in nginx, and use different proxy_cache’s (e.g. /disk1/cache, /disk2/cache and so on) as described in https://www.nginx.com/blog/n

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread rnmx18
Hi Lucas, As long as the cached files (with the metadata at the beginning) reside in the directory specified with the proxy_cache_path directive, they are fine. The NGINX-proxy, which added them there in the first place, can serve the content correctly, after skipping the right amount of metadata

Reverse Proxy problems

2017-09-29 Thread redbaritone
I am having some problems with my Nginx reverse proxy. I'm running a web application on port 8010 that accepts and serves two different web sites from that port. (As far as I know, there's no way to serve them on different ports, with the server I'm using.) I have different host names for each whic

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread Lucas Rolff
Can I ask, what’s the problem with having the metadata in the files? On 29/09/2017, 18.33, "nginx on behalf of rnmx18" wrote: Hi Reinis, Thank you for that pointer to proxy_store directive. I understand that this would be a useful option for static files. However, my ap

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread rnmx18
Hi Reinis, Thank you for that pointer to proxy_store directive. I understand that this would be a useful option for static files. However, my application currently cannot handle aspects like expiry, revalidation, eviction etc. So, I guess I will not be able to use the proxy_store directive for th

Re: Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

2017-09-29 Thread Maxim Dounin
Hello! On Fri, Sep 29, 2017 at 05:00:22AM -0400, rnmx18 wrote: > I have a use-case, where NGINX (say NGINX-process-1) is set up as a reverse > proxy, with caching enabled (say in /mnt/disk2/pubRoot, with zone name > "cacheA"). However, I have another NGINX (say NGINX-Process-B) which also > runs

Re: Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread Reinis Rozitis
While caching files on disk, NGINX-proxy adds certain metadata at the the beginning of the file. Can such files be served by NGINX (acting a server)? Is there a method to skip the metadata part and just serve the content from such a cached file.? Well you can use proxy_store ( http://nginx

Re: Nginx CPU Issue : Remain at 100%

2017-09-29 Thread Valentin V. Bartenev
On Friday, 29 Sep 2017 14:38:58 MSK Yogesh Sharma wrote: > Team, > > I am using nginx as Reverse proxy, where I see that once CPU goes up for > Nginx it never comes down and remain there forever until we kill that > worker. We tried tweaking worker_processes to number of cpu we have, but it > did

Nginx CPU Issue : Remain at 100%

2017-09-29 Thread Yogesh Sharma
Team, I am using nginx as Reverse proxy, where I see that once CPU goes up for Nginx it never comes down and remain there forever until we kill that worker. We tried tweaking worker_processes to number of cpu we have, but it did not helped. Any suggestion in this regards will help. *Version:* ng

Any method for NGINX (as a web-server) to skip metadata and serve content from cached file?

2017-09-29 Thread rnmx18
Hi, While caching files on disk, NGINX-proxy adds certain metadata at the the beginning of the file. Can such files be served by NGINX (acting a server)? Is there a method to skip the metadata part and just serve the content from such a cached file.? Apologies if this is a dumb question. Just st

Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

2017-09-29 Thread rnmx18
Hi, I have a use-case, where NGINX (say NGINX-process-1) is set up as a reverse proxy, with caching enabled (say in /mnt/disk2/pubRoot, with zone name "cacheA"). However, I have another NGINX (say NGINX-Process-B) which also runs in parallel, and caches its content in (/mnt/disk2/frontstore, with