Yikes lots of questions here. BTW, feel free to open issues on our github as well to get help. I know lots of folks there use nginx, while I personally have little experience with it.
Do I need to change .host IP to my site public IP and .port to 80 here?
The backend
should point to the IP and host where Magento is running with nginx.
do I also need to uncomment and change the VARNISH_LISTEN_ADDRESS=192.168.1.5 and VARNISH_LISTEN_PORT=6081 to public IP address of my website and port to 80?
Yes, I believe so.
and what about VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 and VARNISH_ADMIN_LISTEN_PORT=6082 also just to make you aware I did configure DAEMON_OPTS= options according to as described in section 2 of https://github.com/nexcess/magento-turpentine/wiki/Installation
This will depend on how you're setting things up in your environment. These should be accessible to Turpentine, so that it can communicate with Varnish to do things like apply VCL changes and ban/purge items from the cache.
Admin > System > Cache Management: is this fine or do I need to make any change here?
We recommend that people turn off all other caches, and leave on the two Varnish related caches. Once things are working you can tweak these settings.
Admin > System > Configuration > Varnish Options > Servers : need to make any change here? i think I need to enter Varnish Authentication Key from /etc/varnish/secret file?
Yes, unless you've set up Varnish to not use a key.
Also, Config File Location & Custom VCL File Location are not there where path is defined. Will these be generated when I press Admin > System > Cache Management > Varnish Management > Apply Varnish Config.
No, when you click 'Apply Varnish Config' Turpentine will generate a VCL file and attempt to load it into the running Varnish instance. It will also save the generated VCL file in the location you specify under Config File Location
- which may not matter if your Varnish is not set up to read that file when starting up. Custom VCL File Location
is a way to add custom VCL code to the generated VCL file.
finally what to do with Admin > System > Configuration > Caching Options > Backend
This is where you tell Turpentine how to communicate with the Varnish admin interface (IP, port) so it can apply VCL, ban/purge content etc.
You may find our wiki configuration page helpful when setting things up.
First of all connect to your web server with your telnet software.
Change directory with cd <magento dir>/app/etc
Type chmod -R 777 /var/www/html/magento/app/etc
to change mode for env.php
file to be writable.
sudo chmod -R 777 app/etc/env.php
I hope this helps you !!
Best Answer
Use a Command prompt with
php bin/magento cache:disable