Quick Install Apache PHP Mysql for Magento on Ubuntu

Add index.php in file

ming ming !

Configure Enable mod_rewrite .htaccess

Add just before VirtualHost closing tag

Restart apache

Create mysql password if needed and just put files in /var/www/html

This is not the end you need to set file permission properly
sftp user and apache both need write permission

find out which user running apache, for ubuntu its www-data

Set owner permission to work apache and sftp

Set File permission 644 directory 755

to use sftp /var/www must be owned my root:www-data in ubuntu

know directory, disk size
du -hs /path/to/directory
df -h

#list groups of user
#list users of a group
getent group
#add user to a group
usermod -a -G username
#easy dev env permission
chmod -R u=rwx,g=rwx,o=r ./public_html
#lock ports easy with ‘ufw’

Published by


Software Engineer, Magento Developer, Full Stack Web Developer