Reputation:
I am confused about .env file as when I hosted the laravel application the .env file is missing on the web server. If anybody knows the way how can we find .env file on the server please answer.
Upvotes: 1
Views: 5563
Reputation:
By default some files like .env, .htaccess are hidden on the server therefore to see these files we need to set as show hidden files on the server settings.
Upvotes: 0
Reputation: 4032
Try ls -la
to list all files in your web root.
As other have said, it sounds like the file exists but you cannot see it because it is a hidden file (denoted by the .
in .env
)
For future reference, whilst .env
is likely to be excluded in a .gitignore
there is often a .env.example
which is include that you can copy and modify for your environment.
Upvotes: 2
Reputation: 15067
Your .env file is there! It is a hidden file and you can't see it with gui unless if you somehow reveal hidden files! I recommend you to use putty over windows or ssh over linux terminal and edit it if you know how to do that.
Upvotes: 0
Reputation: 12470
By default a Laravel app's Git repo will ignore the .env
file - it's because you will use this on your development machine to configure the app to work on that environment.
You should have another .env
file on your server which provides the configuration required for your app to run in that environment. This file should be maintained between deployments - and most importantly, the credentials inside of it should not be tracked in a repo.
Upvotes: 1