Hello everyone. I’ve been using nginx for a while now but haven’t
scratched the surface, just used recommended options.
I decided I needed to know more about it, so here I am.
In the main http module nginx.conf file there are these lines
include /etc/nginx/mime.types;
default_type application/octet-stream;
I assumed what they meant is that if a client tries to download a file
that is described in the mime.types file, then nginx will handle that
download for me.
In one of our server blocks I’ve noticed that another developer has a
location block like this
Would I be right in assuming that what would happen here is that in this
particular website nginx would still handle the download, but the extra
options are there to handle logging the downloads for this particular
app, setting the limit_rate and giving a specific place to download the
files from?
Im sorry im a bit lost with the question and i have no idea which is the
best. Is it by proxying or caching? I think yes they can change in the
future…
My setup should be something like this:
sample.server.com serve as the main or official site that users will
access and the static files should be located at sample.static.com. How
am i suppose to do it? both servers have nginx how should configure
that?
Thanks Igor!!
A few questions again
Should the two server must have identical files? i mean same directory
and same files?
How should i check that it works?
Is there any documentation i can refer this to as well?
“unknown directive “proxy_cache_path” in
/usr/local/nginx/conf/nginx.conf:57
2009/09/25 20:09:51 11656#0: the configuration file
/usr/local/nginx/conf/nginx.conf test failed”
I am using nginx version: 0.6.35 . Can you please help me?
On Fri, Sep 25, 2009 at 02:30:32AM -0400, bernard.barbosa wrote:
Hi Igor,
Im sorry im a bit lost with the question and i have no idea which is the best. Is it by proxying or caching? I think yes they can change in the future…
My setup should be something like this:
sample.server.com serve as the main or official site that users will access and the static files should be located at sample.static.com. How am i suppose to do it? both servers have nginx how should configure that?
On Fri, Sep 25, 2009 at 05:19:13AM -0400, bernard.barbosa wrote:
Sorry I am getting an error:
“unknown directive “proxy_cache_path” in /usr/local/nginx/conf/nginx.conf:57
2009/09/25 20:09:51 11656#0: the configuration file /usr/local/nginx/conf/nginx.conf test failed”
I am using nginx version: 0.6.35 . Can you please help me?
The HTTP cache has been introduced in 0.7.x. You should use 0.7.62.
I have upgraded my nginx to version 0.7.62 and there is no error now
thanks.
But i think it is not working as i expected it to be. With the
configuration you gave me I can’t find any activities on logs showing
any connection or request on both server. Can you please check what
seems to be wrong on my configuration?
be. With the configuration you gave me I can’t
user www-data www-data; http://wiki.nginx.org/NginxOptimizations
default_type application/octet-stream;
# other
client_body_timeout 3m;
gzip_vary on;