August 16, 2011 02:00PM
worker_processes 2;
worker_rlimit_nofile 2048;
worker_priority -5;

events {
multi_accept on;
worker_connections 2048;
}


http {
include mime.types;
default_type application/octet-stream;
autoindex off;
server_tokens off;
client_max_body_size 3m;
access_log off;
sendfile on;
keepalive_timeout 2m;


server {
server_name example.com;
listen 80;
root html;
index index.html;

location / {
rewrite ^\/.+$ http://www.example.com$request_uri? permanent;
break;
}
}

server {
server_name www.example.com;
listen 80;
root html;
index index.html;

location ~* ^.+\.(jpg|jpeg|gif|gz|zip|flv|rar|wmv|avi|css|swf|png|htc|ico|mpeg|mpg|txt|mp3|mov|js)$ {
break;
root /opt/lampp/htdocs/randevu/public;
#set $ccontrol "max-age=3600";
#if ($arg_no_cache) { set $ccontrol "no-cache max-age=0";}
#add_header Cache-Control $ccontrol;
expires 1y;
}

location ~* ^\/$ {
proxy_pass http://127.0.0.1:8888;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
break;
}

location / {

proxy_buffers 8 64k;
proxy_connect_timeout 2m;
proxy_read_timeout 2m;
proxy_send_timeout 2m;

proxy_pass http://127.0.0.1:8080;
proxy_redirect off;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

location ~ /\.ht {
deny all;
}
}



}
Subject Author Posted

Nginx: conditional "expires" directive

somebi August 16, 2011 07:14AM

Re: Nginx: conditional "expires" directive

António P. P. Almeida August 16, 2011 07:38AM

Re: Nginx: conditional "expires" directive

somebi August 16, 2011 08:16AM

Re: Nginx: conditional "expires" directive

somebi August 16, 2011 08:25AM

Re: Nginx: conditional "expires" directive

António P. P. Almeida August 16, 2011 09:22AM

Re: Nginx: conditional "expires" directive

Oleksandr V. Typlyns'kyi August 16, 2011 11:12AM

Re: Nginx: conditional "expires" directive

somebi August 16, 2011 11:15AM

Re: Nginx: conditional "expires" directive

somebi August 16, 2011 11:16AM

Re: Nginx: conditional "expires" directive

somebi August 16, 2011 12:13PM

Re: Nginx: conditional "expires" directive

somebi August 16, 2011 01:03PM

Re: Nginx: conditional "expires" directive

somebi August 16, 2011 02:00PM

Re: Nginx: conditional "expires" directive

somebi August 16, 2011 02:18PM

Re: Nginx: conditional "expires" directive

António P. P. Almeida August 16, 2011 12:02PM

Re: Nginx: conditional "expires" directive

António P. P. Almeida August 16, 2011 12:06PM

Re: Nginx: conditional "expires" directive

António P. P. Almeida August 16, 2011 12:42PM

Re: Nginx: conditional "expires" directive

Oleksandr V. Typlyns'kyi August 16, 2011 12:58PM

Re: Nginx: conditional "expires" directive

Oleksandr V. Typlyns'kyi August 16, 2011 01:12PM

Re: Nginx: conditional "expires" directive

António P. P. Almeida August 16, 2011 02:12PM

Re: Nginx: conditional "expires" directive

Igor Sysoev August 16, 2011 02:24PM

Re: Nginx: conditional "expires" directive

António P. P. Almeida August 16, 2011 02:44PM

Re: Nginx: conditional "expires" directive

António P. P. Almeida August 16, 2011 02:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 125
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready