@Tray2 Just for greater security, even though intruders won't be able to access the file, I wanted to change its name to be more secure, at least for me.
@YuMp only by a little bit. Sadly chances are that the hacker can list files, if the manage to get access to the root of the project in the first place
@jlrdw Thanks for commenting, and what would be ideal for me? The correct thing is to use the .env file to declare the environment variables as database data and email services, how should I proceed in production then?
@Sinnbeck I found this on stackoverflow and wanted to know if it's safe but jlrdw's comment made me worried. So what am I doing wrong to put the project into production since as a jlrdw I shouldn't use the environment variables file.
Thanks for answering.
@Sinnbeck Ohh ok I got scared, I have several projects that have the .env file.
But back to the subject can I use this configuration to change the name of the .env file, is this approach safe even though they will never have access to the file?
@YuMp it should be possible yes. But as I said, it's only a tiny bit more secure. It only protects in cases where the hacker can access the file directly from the browser anyways (something you should guard against). So if it makes you feel more secure, go for it.
@martinbean I use shared hosting, I believe it is not possible to use actual variables in shared hosting, if you can send me a guide on how to implement it if I want to migrate to a dedicated server or vps in the future. Thanks in advance.
@martinbean I looked at the documentation and it only refers to the encryption of the .env file. Do you have a link to the documentation to implement the env file variables in the system?