I just don't know where else to look and what else to do. I keep getting a 403 error on all my vhosts after setting varnish 3.0

Apacher log:

[error] [client] client denied by server configuration: /etc/apache2/htdocs



GET / HTTP/1.1
Host: domain.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Cookie: __utma=106762181.277908140.1348005089.1354040972.1354058508.6; __utmz=106762181.1348005089.1.1.utmcsr=OTHERDOMAIN.com|utmccn=(referral)|utmcmd=referral|utmcct=/galerias/cocinas
Cache-Control: max-age=0

HTTP/1.1 403 Forbidden
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html; charset=iso-8859-1
X-Cacheable: YES
Content-Length: 223
Accept-Ranges: bytes
Date: Sat, 01 Dec 2012 20:35:14 GMT
X-Varnish: 1030961813 1030961811
Age: 26
Via: 1.1 varnish
Connection: keep-alive
X-Cache: HIT


DAEMON_OPTS="-a ip.ip.ip.ip:80 \
             -T localhost:6082 \
             -f /etc/varnish/main.domain.vcl \
             -S /etc/varnish/secret \
             -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"
             #-s malloc,256m"

My vcl file: http://pastebin.com/axJ57kD8

So, any ideas what I could be missing?


Just so you know, ports:

NameVirtualHost *:8000
Listen 8000

and <VirtualHost>

  • Why is your Apache configuration set to serve documents from /etc/apache2/htdocs? Dec 1, 2012 at 21:10
  • 1
    If the requests are getting the Apache you have something in the access config there Denying the requests from Varnish. Did you change anything in httpd.conf for Varnish? What access rules to you have?
    – Matt
    Dec 1, 2012 at 21:29
  • 1
    @mindthemonkey I have the default apache2.conf can't figure it out why only happens with varnish on
    – w0rldart
    Dec 7, 2012 at 19:29

1 Answer 1


You're sending requests to, which the server is listening on but your virtual host is configured for

When a virtual host is not matched it will try and serve the default site which, from the error, looks like a DocumentRoot /etc/apache2/htdocs which might not have correct permissions, or exist, or be configured in httpd.conf correctly for access, whatever it is doesn't really matter unless you plan on using it at some stage.

Point Varnish at the interface IP
Configure your virtual host to work with
Use the _default_ special name in the same docco if this virtual host should be the default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.