dokshor

by dokshor on January 19th, 2010
No notes
Syntax: No syntax
Show lines - Hide lines - Show in textbox - Download
server {
	listen 80;
	server_name 200.29.69.194 www.udd.cl udd.cl;
	set $store_extra "";
 
	if ($request_uri ~ /$) {
		set $store_extra index.html;
	}
 
	if ($request_uri ~ /index.php$) {
		set $store_extra index.php.html;
	}
 
	proxy_store_access user:rw group:rw all:r;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header Host $host;
 
	location ~ ^/wp-admin/ {
		proxy_pass http://localhost:8080;
	}
 
	location ~ ^/wp-login.php {
		proxy_pass http://localhost:8080;
	}
 
	location ~ ^/contacto/ {
		proxy_pass http://localhost:8080;
	}
 
	location ~ ^/ex-alumnos/red-de-ex-alumnos/ {
		proxy_pass http://localhost:8080;
	}
 
	location / {
 
	   if ( $request_filename ~* (\.php) ){
      		add_header Content-Type "text/html";
      		#add_header Content-Type "text/html; charset=UTF-8";
      		break;
   	   }
 
 
		root /opt/cache/nginx/udd.cl/;
		index index.html;
		proxy_store $document_root${request_uri}${store_extra};
		if (!-f $document_root${request_uri}${store_extra}){
			proxy_pass http://127.0.0.1:8080;
		}
		if (-f $document_root${request_uri}${store_extra}) {
			expires 0;
		}
 
		error_page 404 502 = @dynamic_content_cache_miss;
	}
 
	location @dynamic_content_cache_miss {
		proxy_pass http://localhost:8080;
	}
}
 

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS