That is the only two lines I have nothing set on the command line. uwsgi
should by default look into that directory.
Oh yes there is one other thing you need to change in /etc/init.d/uwsgi (if
you have this) the path to uwsgi is /usr/local/bin/uwsgi
You also set in that file OWNER NAME DESC
/etc/init.d/uwsgi:
PATH=/opt/uwsgi:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/uwsgi
OWNER=uwsgi
NAME=uwsgi
DESC=uwsgi
echo "Trying test"
test -x $DAEMON || exit 0
echo "test passed"
# Include uwsgi defaults if available
if [ -f /etc/default/uwsgi ] ; then
. /etc/default/uwsgi
fi
set -e
# I added --limit-post 4096 to prevent post attacks
DAEMON_OPTS="-s 127.0.0.1:9001 -M 4 -t 30 -A 4 -p 4 -d /var/log/uwsgi.log
--pythonpath $PYTHONPATH --module $MODULE --limit-post 4096"
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --chuid $OWNER:$OWNER --user $OWNER \
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --signal 3 --user $OWNER --quiet --retry 2 --stop
\
--exec $DAEMON
echo "$NAME."
;;
reload)
killall -1 $DAEMON
;;
force-reload)
killall -15 $DAEMON
;;
restart)
echo -n "Restarting $DESC: "
start-stop-daemon --signal 3 --user $OWNER --quiet --retry 2 --stop
\
--exec $DAEMON
sleep 1
start-stop-daemon --user $OWNER --start --quiet --chuid
$OWNER:$OWNER \
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
status)
killall -10 $DAEMON
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N
{start|stop|restart|reload|force-reload|status}" >&2
exit 1
;;
esac
exit 0
On Fri, May 18, 2012 at 10:58 AM, Roberto De Ioris <[email protected]> wrote:
>
> > Bruce: do you only need two lines of uwsgi config? Where do you put the
> > rest of the directives? command line?
> >
> > Does anyone know how to have one uwsgi config file load another (as we do
> > in apache)? I was trying to see an example or find it in uwsgi docs to
> no
> > avail.
> >
> >
>
> http://projects.unbit.it/uwsgi/wiki/ParsingOrder
>
>
> --
> Roberto De Ioris
> http://unbit.it
>
--
--
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com