Comments on Building Nginx From Source On Debian Squeeze

Building Nginx From Source On Debian Squeeze This tutorial describes how you can build nginx from source on Debian Squeeze. Additionally, we will include some useful 3rd-party modules like the naxsi WAF (web application firewall), SPDY etc.

7 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By:

I found this on the naxsi site:

You need to remember this if you are new to nginx :

NGINX will decide the order of modules according the order of the module's directive in nginx's ./configure. So, no matter what (except you reallyknow what you are doing) put naxsi first in your ./configure.

If you don't do so, you might run into various problems, from random / unpredictable behaviors to non-effective WAF.

By: Josh

I tried putting the naxsi module first and it caused a bunch of errors when building an rpm that had not been there when the module was added later in the compile options.  Not sure if anyone has any thoughts on how to resolve this.  (I realize I'm not providing lots of info).  I can provide configure options if that would be helpful.  Thus far, searching hasn't provided the hoped for results.

By: Anonymous

There is a typo in the article:

correct path in #7 is /etc/default/nginx not defaultS

By: Anonymous

All the links are dead...

By:

They are all working. You might want to check your connection.

By: MLWALK3R

Looks like Github had issues that day, they do work now :D

By: aysad K

please correct your autostart up init.d script it dont work on debian

 

here correct autostartup init.d script for nginx (/etc/init.d/nginx)

 

#! /bin/sh ### BEGIN INIT INFO # Provides: nginx # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts the nginx web server # Description: starts nginx using start-stop-daemon ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/local/sbin/nginx NAME=nginx DESC=nginx test -x $DAEMON || exit 0 # Include nginx defaults if available if [ -f /etc/default/nginx ] ; then . /etc/default/nginx fi set -e case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \ --exec $DAEMON echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --pidfile \ /usr/local/nginx/logs/$NAME.pid --exec $DAEMON sleep 1 start-stop-daemon --start --quiet --pidfile \ /usr/local/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; reload) echo -n "Reloading $DESC configuration: " start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \ --exec $DAEMON echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0