Hey guys,
Today I installed nginx 1.2.2 on my new Virtual Private Server having Ubuntu 11.10 Server Edition.
I manually built the nginx 1.2.2 so after the installation and all the configurations, when I finally entered the following command in putty:
Code:
sudo /etc/init.d/nginx start
I got the response:
Code:
Starting nginx: start-stop-daemon: --start needs --exec or --startas
Try 'start-stop-daemon --help' for more information.
and when I enter the IP Address of my VPS in the the browser, I can't see the nginx Welcome Page.
Also, when I run top command in putty I don't see any process related to nginx running there, this shows that running
Code:
sudo /etc/init.d/nginx start
is not starting up nginx
the contents of nginx script is:
Code:
#! /bin/sh
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$
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/$NAME.$
--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/$
--exec $DAEMON
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
So guys I can't figure out whats the problem, how can I make nginx script run at the startup, please help me out
Thanks a lot
