Download the module from https://www.drupal.org/project/authcache
Enable only the authcache module
Go to admin/reports/status, then you can see the Authcache area is red and saying that there is no back end has been configured.

Select everything on the file and delete. Copy everything form the Mydefault.vcl file[click to download], then paste into the /etc/varnish/default.vcl and save.
After saving you can check the syntax using following command.

$ sudo varnishd -c -f /etc/varnish/default.vcl

Making Nginx to listen on 8080 instead of 80, For that you need to edit '/etc/nginx/sites-available/default' file using following command.

$ sudo gedit /etc/nginx/sites-available/default

While editing, you need to add the line "listen 127.0.0.1:8080 default_server;" and comment the lines "listen 80 default_server;" and "listen [::]:80 default_server ipv6only=on;"

It should be look like,

server { listen 127.0.0.1:8080 default_server; # <==================== you need to add this line and it will make the nginx to listen for traffic #listen 80 default_server; #listen [::]:80 default_server ipv6only=on; [.............] }

You can check the nginx syntax using following command.

$ sudo nginx -t

Well everything is fine then we need to stop the nginx and start the varnish, then after we have the start the nginx using following commands

$ service nginx stop $ service varnish restart $ service nginx start

3. Enabling Authcache_varnish module

From the Step 1 we find out there is no backend has been configured for the Authcache in path "admin/reports/status".
So now we are going to set up the Authcache_varnish as the backend for the Authcache.
For that got to "admin/modules" and enable authcache_varnish module.
Also reffer the README.txt uner "/sites/all/modules/authcache/modules/authcache_varnish".
In the README.txt file explaining about the configuration about the .vcl using the example.vcl, but here we already taken care about that
in our step 2 by editing the data in the file "/etc/nginx/sites-available/default"

Go to "admin/config/development/performance" and set "Expiration of cached pages" to an appropriate value (> 0). Eg. 6 hours.
Next we need to go advance to the step 4 and 5, install, enable and configure the Varnish and Cache Expiration modules.

After doing the step 4 and 5 we need to set up the reverse proxy server.
Authcache Varnish verifies whether a request is coming in through a trusted proxy server.
Therefore it is necessary to properly configure reverse proxy support in settings.php. E.g:
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array('a.b.c.d');// Replace 'a.b.c.d' with the IP address of the revers proxy server.
For testing purposes it is possible to disable the reverse proxy check by placing the following line into the settings.php file:
$conf['authcache_varnish_validate_reverse_proxy_address'] = FALSE;
Beside the reverse proxy address Authcache Varnish also tests whether the X-Varnish header is on the request.
In order to disable this check, place thefollowing line into settings.php:
$conf['authcache_varnish_header'] = FALSE;
So here we are adding the following lines to our 'settings.php' file under directory "sites/default/". $conf['authcache_varnish_validate_reverse_proxy_address'] = FALSE; $conf['authcache_varnish_header'] = FALSE;

Finally clear cache under "admin/config/development/performance" and go to 'admin/reports/status'. You can see the Authcache area is in green color
with report message as "hook_authcache_backend_cache_save() implemented: authcache_varnish";.
And go to 'admin/config/system/authcache' and do the necessary configuration according to your requirement.

4. Enabling and configuring the Varnish module

Download the module from https://www.drupal.org/project/varnish and extarct to the 'sites/all/modules/'.
Reffere the README.txt file under the varnish module directory.
Enable the module fromt the path admin/modules
Then edit your "settings.php" file in your "sites/default/" and add the following lines.

Go to admin/config/development/varnish and configure your connection
1. Configure "Varnish Control Key",for finding the "Varnish Control Key" you need use the following commands

$ sudo gedit /etc/varnish/

Copy and paste in the field "Varnish Control Key"
2. Configure "Varnish Control Terminal", For that you need to add the IP address "127.0.0.1:6082" to the field Varnish Control Terminal
and Save Configuration.
Finally, after saving the configuration you can see the 'Status' with green tick mark and "Varnish running" message.

Add the following lines to the "settings.php" file in your "sites/default/" directory.

# Include the Cache Object API Wrapper as a cache backend
$conf['cache_backends'][] = 'sites/all/modules/cacheobject/cacheobject.inc';
# Set the cache class for the form cache to
$conf['cache_class_cache_form'] = 'CacheObjectAPIWrapper';
# Optionally set the underlying cache class
$conf['cacheobject_class_cache_form'] = 'DrupalDatabaseCache';

8. Enable Authcache Debug module.

Go to 'admin/modules' enable Enable Authcache modules.
Then navigate to "admin/config/system/authcache/debug", check the "Enable debug mode for all roles" and save the configuration.

Finally you can navigate to any page[not with admin user] and find the Authcache Debug. You can check Cache Status: "MISS" or the indicator as yellow.
If it is yellow please refresh the page , then you can find the Cache Status changes to "HIT".