Import flag image set
[www.martinvillalba.com.git] / nginx.conf
blobd10444f50e75a02365b3b64759912ff8d9fadb1d
1 ################################################################
2 #     Web server configuration for www.martinvillalba.com.     #
3 ################################################################
5 worker_processes    1;
6 pid                 nginx.pid;
8 events {
9     worker_connections  1024;
12 http {
13     ## MIME Types ##
14     include                     nginx/conf/mime.types;
15     default_type                application/octet-stream;
17     ## Size Limits ##
18     client_body_buffer_size     8k;
19     client_header_buffer_size   1k;
20     client_max_body_size        1k;
21     large_client_header_buffers 1 1k;
23     ## Timeouts ##
24     client_body_timeout         60;
25     client_header_timeout       60;
26     keepalive_timeout           60 60;
27     send_timeout                60;
29     ## General Options ##
30     keepalive_requests          10;
31     ignore_invalid_headers      on;
32     limit_zone                  gulag $binary_remote_addr 1m;
33     recursive_error_pages       on;
34     sendfile                    on;
35     server_name_in_redirect     off;
36     server_tokens               off;
37     index                       index.html
39     ## TCP Options ##
40     tcp_nodelay                 on;
41     tcp_nopush                  on;
43     ## Compression ##
44     gzip                        on;
45     gzip_static                 on;
46     gzip_buffers                16 8k;
47     gzip_comp_level             1;
48     gzip_http_version           1.1;
49     gzip_min_length             10;
50     gzip_types                  text/plain text/css image/x-icon image/x-ms-bmp
51                                 text/x-javascript text/xml application/xml+rss
52                                 application/atom+xml images/svg+xml
53                                 application/pdf application/xhtml+xml;
54     gzip_vary                   on;
56     ## Log Format ##
57     log_format                  main '$remote_addr $host $remote_user'
58                                      ' [$time_local] "$request" $status'
59                                      ' $body_bytes_sent "$http_referer"'
60                                      ' "$http_user_agent" "$gzip_ratio"';
62     ## Default Host (Deny All) ##
63     #server {
64     #    server_name             _;
65     #    return                  444;
66     #}
68     ## Domain Root Host (Redirect All) ##
69     server {
70         listen                  martinvillalba.com:80;
71         server_name             martinvillalba.com;
72         rewrite                 ^ $scheme://www.martinvillalba.com$request_uri?
73                                 permanent;
74     }
76     ## WWW Host (Serve) ##
77     server {
78         ## Caching ##
79         add_header              Cache-Control public;
80         expires                 24h;
82         ## Interface ##
83         listen                  www.martinvillalba.com:80;
84         server_name             www.martinvillalba.com;
85         limit_conn              gulag 10;
87         ## Log ##
88         access_log              logs/access.log main;
89         error_log               logs/error.log info;
91         ## General ##
92         root                    site;
93         charset                 utf-8;
95         ## Curse Of The Favicon ##
96         location /favicon.ico {
97             return              204;
98         }
100         ## Error Handling ##
101         #Use default handler pages.
102     }