apache2

 

Setting up web server is common thing among web developers. And, this is how, i usually do while setting up apache2 webserver along with php and mysql-server for starting with any simple project as,

After that, i define servername in /etc/apache2/conf-available/servername.conf  and enable this configuration file as,

Now, i create the project directory and configure the site and enable it as,

Finally, I could check the status and restart the apache2 service as,

Also, it is very important to know about permission and apply them. The general read permission usually i do as,

Best Practice,

Also, a small note regarding permission,

Cheers!

 

For Enabling CGI,

For enable mcrypt

 

References for security:

1. http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride

2. https://perishablepress.com/stupid-htaccess-tricks/#sec6

3. http://webrewrite.com/deny-access-of-files-and-folders-through-htaccess/