Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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;|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:

So, any ideas what I could be missing?


Just so you know, ports:

NameVirtualHost *:8000
Listen 8000

and <VirtualHost>

share|improve this question
Why is your Apache configuration set to serve documents from /etc/apache2/htdocs? – Michael Hampton Dec 1 '12 at 21:10
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 '12 at 21:29
@mindthemonkey I have the default apache2.conf can't figure it out why only happens with varnish on – w0rldart Dec 7 '12 at 19:29
up vote 4 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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