Virtualhost issue
Vladimir Dyachenko
vlad.dyachenko at gmail.com
Mon Nov 2 15:32:31 CET 2009
Hey Adan,
Thanks for reply. I will review all my configuration.
2009/11/2 andan andan armdan20 at gmail.com
>
> You are using an old syntax, backend syntax has changed.
>
> backend default {
> .host = "localhost";
> .port = "80";
> }
>
BTW, I was asked what do I use to start varnish and what varnishlog output.
Well varnishlog does not give any output and my init script is as follow:
#! /bin/sh
#
# varnish Control the varnish HTTP accelerator
#
# chkconfig: - 90 10
# description: HTTP accelerator
# processname: varnishd
# config: /etc/varnish/vcl.conf
# pidfile: /var/run/varnish/varnishd.pid
# Source function library.
. /etc/init.d/functions
RETVAL=0
PROCNAME=varnishd
PIDFILE=/var/run/varnish.pid
LOCKFILE=/var/lock/subsys/varnish
# Include varnish defaults
. /etc/sysconfig/varnish
DAEMON="/usr/sbin/varnishd"
mkdir -p /var/run/varnish 2>/dev/null
# Open files (usually 1024, which is way too small for varnish)
ulimit -n ${NFILES:-131072}
# See how we were called.
case "$1" in
start)
echo -n "Starting varnish HTTP accelerator: "
# $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one
# has to set up a backend, or /tmp will be used, which is a bad
idea.
if [ "$DAEMON_OPTS" = "" ]; then
echo "\$DAEMON_OPTS empty."
echo -n "Please put configuration options in
/etc/sysconfig/varnish"
echo_failure
else
daemon ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1
sleep 1
pkill -0 $PROCNAME
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
echo_success
touch $LOCKFILE
else
echo_failure
fi
fi
echo
;;
stop)
echo -n "Stopping varnish HTTP accelerator: "
killproc $DAEMON
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
echo_success
rm -f $LOCKFILE $PIDFILE
else
echo_failure
fi
echo
;;
status)
status $PROCNAME
RETVAL=$?
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
condrestart)
if [ -f $PIDFILE ]; then
$0 stop
$0 start
RETVAL=$?
fi
;;
*)
echo "Usage: $0 {start|stop|status|restart|condrestart}"
exit 1
esac
.Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20091102/b9c893e8/attachment-0001.html>
More information about the varnish-misc
mailing list