Java Ruby Shell
Latest commit 159822f May 16, 2012 @yaoweibin Update conf/nginx.conf
Failed to load latest commit information.
captcha add the img directory Dec 16, 2011


= An efficient CAPTCHA server

== Description

This server is built on Nginx and Memcached. It stores all the CAPTCHA image in
the memcached. When the new request cames, Nginx will reply a CAPTCHA page. If the
client passes the verification, He will be given a secure cookie. With this
cookie, client can visit all the resources in the server. 

== Component 

* The derivate of Nginx: ngx_openresty(
* My secure cookie module(
* Memcached
* JCaptcha 2.0(

== Installation

=== Install the memcached
$tar zxvf memcached-1.4.10.tar.gz
$cd memcached-1.4.10
$./configure && make
$sudo make install
$/usr/local/bin/memcached -d

=== Generate the CAPTCHA image
$cd /path/to/captcha_server
$cd captcha
$./ # 10000 images will be created in the img directory
$ruby put_img.rb #You need the memcached gem packet

=== Install the Nginx
$tar zxvf ngx_openresty-
$cd ngx_openresty-
$git clone git://
$./configure  --with-debug --with-luajit \
$sudo make install

=== Copy the configure and pages
$cd /path/to/captcha_server
$cp conf/nginx.conf /path/to/nginx.conf
$cp html/* /path/to/html/   #this is your root directory

=== Start the Nginx
$sudo /usr/loca/nginx/sbin/nginx -c /path/to/nginx.conf