Theres many ways to get this done. I just found this one easiest.
Instructions are for Ubuntu 12.04 – If you’re trying on any other version, you may get a different version on nginx. Make changes to the commands and the patch accordingly
sudo apt-get update
sudo apt-get install build-essential dpkg-dev
sudo apt-get build-dep nginx
mkdir /tmp/nginx
cd /tmp/nginx
sudo apt-get source nginx
mkdir mod
cd mod
wget https://raw.github.com/yaoweibin/nginx_syslog_patch/master/syslog_1.2.0.patch
wget https://github.com/yaoweibin/nginx_syslog_patch/raw/master/config
cd ../nginx-1.1.19
sudo patch -p1 < ../mod/syslog_1.2.0.patch
Now you need to edit /tmp/nginx/nginx-1.1.19/debian/rules file. look for
config.status.full: config.env.full config.sub config.guess
…
…
…
–add-module=$(MODULESDIR)/nginx-auth-pam \
–add-module=$(MODULESDIR)/nginx-echo \
–add-module=$(MODULESDIR)/nginx-upstream-fair \
–add-module=$(MODULESDIR)/nginx-dav-ext-module \
$(CONFIGURE_OPTS) >$@
add “–add-module=/tmp/nginx/mod \” so it looks something like this
–add-module=$(MODULESDIR)/nginx-auth-pam \
–add-module=$(MODULESDIR)/nginx-echo \
–add-module=$(MODULESDIR)/nginx-upstream-fair \
–add-module=$(MODULESDIR)/nginx-dav-ext-module \
–add-module=/tmp/nginx/mod \
$(CONFIGURE_OPTS) >$@
If you’re going to install nginx-light/nginx-extras, scroll down a bit further, and add it there
cd /tmp/nginx/nginx-1.1.19
sudo dpkg-buildpackage -us -uc -nc
cd ..
dpkg -i nginx-common_1.1.19-1_all.deb nginx-full_1.1.19-1_amd64.deb
replace ‘light/extras’ accordingly.
Edit your config by referring to the syslog patch’s README https://github.com/yaoweibin/nginx_syslog_patch
Recent Comments