Welcome! Log In Create A New Profile

Advanced

Re: Can't get Nginx to work with memcached

May 28, 2009 08:46PM
Arrgghh......... so, I found out that some things are bugged within 0.6.32 so I installed 0.6.37 from source. After configuring everything, the same problem is occuring- ie: memcaching does not work. Here are my configs. Any help is much appreciated.

/usr/local/nginx/conf/nginx.conf

[code]
user www-data;
worker_processes 1;

error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include 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 logs/access.log main;

sendfile on;
tcp_nopush on;

#keepalive_timeout 0;
#keepalive_timeout 65;

gzip on;

include /usr/local/nginx/conf/nginx.conf.default;

upstream backend {
server 127.0.0.1:81;
}

server {

#charset koi8-r;

#access_log logs/host.access.log main;
listen 80;

location / {
root html;
index index.html index.htm;
set $memcached_key $uri;
memcached_pass 127.0.0.1:11211;
default_type text/html;
error_page 404 = /fetch;
}

location /fetch {
proxy_pass http://backend;
break;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}

}
[/code]




/usr/local/nginx/conf/nginx.conf.default
[code]
server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html;
index index.html index.htm;
set $memcached_key $uri;
memcached_pass 127.0.0.1:11211;
default_type text/html;
error_page 404 = /fetch;
}

location /fetch {
proxy_pass http://backend;
break;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
[/code]
Subject Author Posted

Can't get Nginx to work with memcached

sayeo87 May 27, 2009 10:43PM

Re: Can't get Nginx to work with memcached

sayeo87 May 28, 2009 02:00PM

Re: Can't get Nginx to work with memcached

Cliff Wells May 28, 2009 09:16PM

Re: Can't get Nginx to work with memcached

merlin corey May 29, 2009 12:12AM

Re: Can't get Nginx to work with memcached

sayeo87 May 28, 2009 08:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 312
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready