Welcome! Log In Create A New Profile

Advanced

Re: How to use srcache_store while proxy_pass use to connect backend

March 08, 2012 12:51AM
Hi agentzh,

Thanks for helping me out. I build a fresh setup and enabled the debug and followings are the details.

nginx.debug -V
nginx: nginx version: nginx/1.0.9
nginx: built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
nginx: TLS SNI support disabled
nginx: configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-debug --with-cc-opt='-O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --add-module=/usr/local/n1xman/rpmbuild/BUILD/nginx-1.0.9/contrib/memc-nginx-module-4007350 --add-module=/usr/local/n1xman/rpmbuild/BUILD/nginx-1.0.9/contrib/echo-nginx-module-6c1f553 --add-module=/usr/local/n1xman/rpmbuild/BUILD/nginx-1.0.9/contrib/simpl-ngx_devel_kit-24202b4 --add-module=/usr/local/n1xman/rpmbuild/BUILD/nginx-1.0.9/contrib/set-misc-nginx-module-e6a54ab --add-module=/usr/local/n1xman/rpmbuild/BUILD/nginx-1.0.9/contrib/srcache-nginx-module-86e7a18


uname -a
Linux abmx-test 2.6.18-194.el5PAE #1 SMP Tue Mar 16 22:00:21 EDT 2010 i686 i686 i386 GNU/Linux

cat /etc/nginx/nginx.conf

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}

cat /etc/nginx/conf.d/default.conf
upstream my_mem {
server 127.0.0.1:11211;
}

server {
listen 80;
server_name localhost;

access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log debug;

default_type application/json;

location = /memc {
internal;

memc_connect_timeout 100ms;
memc_send_timeout 100ms;
memc_read_timeout 100ms;

set $memc_key $query_string;
set $memc_exptime 300;

memc_pass my_mem;
}

location /mix2 {
proxy_pass http://data.directfn.com;
set $key $args;
srcache_fetch GET /memc $key;
srcache_store PUT /memc $key;
srcache_store_statuses 200 301 302 404;

}

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

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

}


/var/log/nginx/error.log
http://pastebin.com/W7Jk3sq8
Subject Author Posted

How to use srcache_store while proxy_pass use to connect backend

n1xman March 05, 2012 12:48PM

Re: How to use srcache_store while proxy_pass use to connect backend

hira2 March 05, 2012 01:23PM

Re: How to use srcache_store while proxy_pass use to connect backend

agentzh March 06, 2012 08:28PM

Re: How to use srcache_store while proxy_pass use to connect backend

n1xman March 08, 2012 12:51AM

Re: How to use srcache_store while proxy_pass use to connect backend

agentzh March 08, 2012 01:04AM

Re: How to use srcache_store while proxy_pass use to connect backend

n1xman March 08, 2012 01:31AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 208
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