For a particular domain for which we are going to prevent access to the .env file, check which Proxy Template is active. In this example, let's suppose that would be: 'proxy-pass-docker'
So config files for this nginx template are those two:
Code: Select all
/usr/local/vesta/data/templates/web/nginx/proxy-pass-docker.tpl
/usr/local/vesta/data/templates/web/nginx/proxy-pass-docker.stpl
Particularly this one:
Code: Select all
location ~ /\.env {return 404;}
And the end, rebuild the nginx conf file with this:
Code: Select all
v-rebuild-web-domains admin