Mark,<br><br>Why not just use apt-get source to get the source package of nginx; wget the latest nginx; copy the debian/ directory from the source package into the new nginx directory; edit the (dch) changelog, control file, etc; rebuild the package (debuild -rfakeroot), and install with dpkg?<br>
<br>That&#39;s what I do, anyway.  I recommend similar procedure with any software package -- you can even use dh_make to create the debian/ directory for any particular source directory.  Try this guide out: <a href="http://david415.wordpress.com/2008/09/10/customdebianopensshpackagebuild/">http://david415.wordpress.com/2008/09/10/customdebianopensshpackagebuild/</a> which tells you how to make the debian package for latest openssl from scratch - what I mentioned above is how to do it from the existing package, which is what you want in this case because it has all the init.d files and such for you!<br>
<br>There should be plenty of information around the net on building custom debian packages, if you have trouble finding it, try checking out debian-mentors (they have mailing list and IRC).<br><br>- Merlin<br><br><div class="gmail_quote">
On Mon, Mar 23, 2009 at 1:42 PM, Mark Alan <span dir="ltr">&lt;<a href="mailto:varia@e-healthexpert.org">varia@e-healthexpert.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am attaching the procedure that we use to to always have the latest nginx version in Ubuntu/Debian.<br>
<br>
M.<br>
<br>
## -- start-of-procedure<br>
<br>
# Install the current Nginx (Ubuntu 8.10 = Nginx/0.6.34 @ backports)<br>
sudo aptitude -R install nginx= ; # the ending = means install &amp; hold to   prevent automatic upgrades<br>
<br>
# install needed ubuntu/debian compiling tools<br>
sudo aptitude -R install build-essential libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev<br>
<br>
# build &amp; replace by the latest &quot;debianized&quot; Nginx 0.7.44<br>
test -x $HOME/src/ || mkdir -p $HOME/src/ &amp;&amp; cd $HOME/src/<br>
# nginx&#39;s latest version: &lt;<a href="http://sysoev.ru/nginx/download.html" target="_blank">http://sysoev.ru/nginx/download.html</a>&gt;<br>
wget <a href="http://sysoev.ru/nginx/nginx-0.7.44.tar.gz" target="_blank">http://sysoev.ru/nginx/nginx-0.7.44.tar.gz</a><br>
tar zxvf nginx-0.7.44.tar.gz<br>
<br>
cd nginx-0.7.44<br>
./configure --prefix=/etc/nginx \<br>
        --sbin-path=/usr/sbin/nginx \<br>
        --conf-path=/etc/nginx/nginx.conf \<br>
        --error-log-path=/var/log/nginx/error.log \<br>
        --pid-path=/var/run/nginx.pid \<br>
        --lock-path=/var/lock/nginx.lock \<br>
        --user=www-data \<br>
        --group=www-data \<br>
        --http-log-path=/var/log/nginx/access.log \<br>
        --http-client-body-temp-path=/var/lib/nginx/body \<br>
        --http-proxy-temp-path=/var/lib/nginx/proxy \<br>
        --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \<br>
        --with-cc-opt=-O2 \<br>
        --with-http_gzip_static_module \<br>
        --with-http_ssl_module<br>
<br>
# ensure that there is only one -O in CFLAGS and that it is -O2<br>
sed -i &#39;/CFLAGS/s/ \-O //g&#39; objs/Makefile<br>
<br>
make<br>
<br>
# debian policy: use &#39;install&#39; instead of &#39;cp&#39; or &#39;mv&#39;<br>
sudo /usr/bin/install -s -m 755 -o root objs/nginx /usr/sbin/nginx.new &amp;&amp; sudo mv /usr/sbin/nginx /usr/sbin/nginx.old-&quot;$(date +%Y%m%d-%H%M-%S)&quot; &amp;&amp; sudo mv -v /usr/sbin/nginx.new /usr/sbin/nginx<br>

<br>
sudo kill -15 $(pidof nginx) ; sudo /etc/init.d/nginx restart<br>
<br>
## -- end-of-procedure<br>
<br>
</blockquote></div><br>