Nginx IPV6

Download nginx rpm SOURCE

http://centos.alt.ru/pub/nginx/0.8/RHEL/SRPMS/nginx-0.8.46-1.el5.src.rpm

Install rpm source

# rpm -Uvh nginx-0.8.46-1.el5.src.rpm

Chnage to rpm spec directory

# cd /path/to/rpm/spec/dir

Edit nginx.spec and add –with-ipv6 at configure section. IE:

./configure \
    --user=%{nginx_user} \
    --group=%{nginx_group} \
    --prefix=%{nginx_datadir} \
    --sbin-path=%{_sbindir}/%{name} \
    --conf-path=%{nginx_confdir}/%{name}.conf \
    --error-log-path=%{nginx_logdir}/error.log \
    --http-log-path=%{nginx_logdir}/access.log \
    --http-client-body-temp-path=%{nginx_home_tmp}/client_body \
    --http-proxy-temp-path=%{nginx_home_tmp}/proxy \
    --http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \
    --pid-path=%{_localstatedir}/run/%{name}.pid \
    --lock-path=%{_localstatedir}/lock/subsys/%{name} \
    --with-http_secure_link_module \
    --with-http_random_index_module \
    --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_gzip_static_module \
    --with-http_stub_status_module \
    --with-http_perl_module \
    --with-ipv6 \
    --with-mail \
    --with-mail_ssl_module \
    --with-cc-opt="%{optflags} $(pcre-config --cflags)" \
    --add-module=%{_builddir}/nginx-%{version}/nginx-upstream-fair \
    --add-module=%{_builddir}/nginx-%{version}/nginx-upload-progress-module \
    --add-module=%{_builddir}/nginx-%{version}/mod_zip-1.1.5 \
    --add-module=%{_builddir}/nginx-%{version}/nginx_upload_module-2.0.12 \
    --add-module=%{_builddir}/nginx-%{version}/nginx_mod_h264_streaming-2.2.7