Redhat and its related distributions (fedora, centos) keep their original rpms in a very regular directory tree. for RHEL5 you want: ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/ for other releases, you can browse the ftp server until you find what you want. Otherwise google for the exact version of nginx you have ( rpm -q nginx)
Assuming you can find srpm, install it with rpm:
rpm -ivh nginx-xxxx.src.rpm
This will create sources and create files in /usr/src/redhat/{BUILD,SPEC,SRC,SOURCES}. You can modify the file .specin /usr/src/redhat/SPECto build the module that you want along with the rest of nginx, or you can create nginx manually.
? fedora nginx.spec configure. , :
./configure \
[snip...]
--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 \
[snip...]
- nginx.spec rpm rpmbuild:
rpmbuild -ba nginx.spec
, , rpmbuild /usr/src/redhat/RPMS/
: yum nginx . , , , , . . , nginx , yum (, /etc/yum.repos.d/${repo}.repo . ):
exclude=nginx*
yum --exclude
yum --exclude=nginx*