get paid to paste

nginx config

server {
	    listen       80;
		server_name  server.name;
 
	    charset utf-8;

		location / {
			root   /path/to/server/server.name;
			index  index.php;
			try_files $uri $uri/ /index.php?r=$request_uri;
		}
	 
		location /site {
			try_files $uri $uri/ /index.php?r=$request_uri;
		}

		location ~ ^/protected/ {
			deny  all;
		}

		location ~*.(js|jpg|jpeg|gif|png|ico)$ {
			root /path/to/server/server.name;
			expires 356d;
			add_header Cache-Control public;
		}

		location ~ \.php$ {
			root           /path/to/server/server.name;
			fastcgi_pass   127.0.0.1:9234;
			fastcgi_index  index.php;
			fastcgi_param  SCRIPT_FILENAME  /path/to/server/server.name$fastcgi_script_name;
			fastcgi_param  PATH_INFO $fastcgi_script_name;
			include        fastcgi_params;
	 
			set $path_info $request_uri;
	 
			if ($request_uri ~ "^(.*)(\?.*)$") {
				set $path_info $1;
			}
			fastcgi_param PATH_INFO $path_info;
		}
	}

Pasted: Apr 30, 2011, 12:30:53 pm
Views: 114