static web server config improvements

rkmr.em at gmail.com rkmr.em at gmail.com
Tue Jan 29 00:43:17 MSK 2008


On Jan 28, 2008 10:59 AM, eliott <eliott at cactuswax.net> wrote:

> On 1/28/08, rkmr.em at gmail.com <rkmr.em at gmail.com> wrote:
> > this is my config for a web server that does only static files mostly
> gifs,
> > pngs and jpgs.. is there any improvement i can do in this like is there
> some
> > sort of caching that can be enabled? or any other improvements that can
> be
> > done to this..
> >
> > ------------------------------------------------------------------
> > #user  mark;
> > worker_processes  1;
> > error_log  logs/error_staticfarm.log;
> >
> > pid        logs/nginx_staticfarm.pid;
> > events {
> >     worker_connections  1024;
> >  }
> >
> > http {
> >     include       mime.types;
> >     default_type  application/octet-stream;
> >
> >     #access_log  logs/access_staticfarm.log;
> >
> >     sendfile        on;
> >     #tcp_nopush     on;
> >
> >     keepalive_timeout  0;
> >      #keepalive_timeout  10;
> >
> >     gzip  on;
> >     server {
> >         listen       6080;
> >         server_name  localhost;
> >         #access_log  logs/host.access.log  main;
> >         location /nginx_status {
> >              stub_status on;
> >             access_log   off;
> >         }
> >         location /static{
> >             root   /home/mark/staticfarm/;
> >             access_log   off;
> >         }
> >     }
> > }
> >
>
>
> If you have more than one cpu, you could up the worker_processes to
> match the number of cpus you have. Depends on the traffic load you are


is this number of cpus or number of cores? if I have two quad cores,
worker_process = 8

is this right?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080128/f4c61f24/attachment.html>


More information about the nginx mailing list