Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

DDSameera's avatar

How to Build up Securable App in Production Environment

Hey Genuis , this topic is really good for us. Once we setup our Application in production environment , we should have to protect our solution from hackers. Lets talk about all securable things need to be done from developer and server side.

0 likes
1 reply
DDSameera's avatar

#1. Secure Your .env file. DO NOT let it open in public people.

<VirtualHost *:80>
    ServerName samadhi.boobamba
    ServerAlias samadhi.boobamba
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/samadhi.boobamba.com/public_html

    <Directory /var/www/html/samadhi.boobamba.com/public_html>
        Options -Indexes +FollowSymLinks
        AllowOverride All
		
		#Disable index view
			options -Indexes

		#hide a Specifuc File
			<Files .env>
			order allow,deny
			Deny from all
			</Files>
    </Directory>

    ErrorLog /var/www/html/samadhi.boobamba.com/error.log
    CustomLog /var/www/html/samadhi.boobamba.com/requests.log combined
</VirtualHost>

#2. Set up SSL Certificate - (Recommended : Branded Cerficiate)

Please or to participate in this conversation.