Directory structure

Once logged in via SSH/SCP/FTP, you will soon familiarise yourself with the directory hierarchy.



This directory is read-only and contains your domain backups and database backups.

! 3 days of incremental file backups are kept ! 7 days of database backups are kept

After which, both are rotated.

Outside of the /microcloud directory – you may do whatever you please. But bear in mind your disk space is shared with the host system. So keep an eye on dh -h or your Munin Graphs



This directory is read-only. It contains all necessary logs for your domains. The log files are rotated on a daily basis and kept for 7 days. Logs are also centrally logged with a web interface.

The log files are gzip compressed, so to view the file, you must decompress the file.

Eg. To view the last 10 lines of the Nginx access log file for today, use zcat

zcat /microcloud/logs_ro/web*/nginx-access-$(date +%F).log.gz | tail -n 10

Eg. View the Nginx access log file for a specific IP address, use zgrep

zgrep '' /microcloud/logs_ro/web*/nginx-access-$(date +%F).log.gz



This directory is read-write and contains all the files for your web site. Websites can be combined into a single group if they have commonality – or otherwise can be grouped individually.

The group defines the chroot jail that the domains will operate from. This provides another level of security so that the PHP-FPM process (runs as www-data) cannot escape its operating directory. It protects groups from each other and still allows for very simple file permissions management (ie. everything owned by www-data 33:33).

Four key directories are created as standard:         
  http             represents any traffic sent to
  maintenance      is a special directory for when maintenance mode is turned on
  ___general       is a special directory for Nginx configuration includes
  ___maintenance   is a special directory for Nginx configuration includes
  ___rewrites      is a special directory for Nginx configuration includes

If your domain was configured with wildcard support (default), then adding new sub-domains is very straightforward, just create a new directory in the group/domains/domainname directory.

Eg. /microcloud/domains/example/domains/

You can also symlink directories to another, an example would be to serve the media and skin directories from subdomains – but still retain the standard Magento folder hierarchy.

cd /microcloud/domains/
ln –s www/media media 
ln –s www/skin skin

! Symlinks must be relative and not absolute
! www is symlinked to http by default, www => http
! The http directory represents the non-subdomain variant of your domain (ie.
! The differentiation between ___general and ___rewrites is that the general config include is defined in the server { } scope for the vhost – whereas the rewrite config include is defined in the location / { } scope.

! Try not to put anything in the /microcloud directory other than the website files themselves; this helps keep file clutter to a minimum.
! There are no resource limits applied to the access server by default, it can utilise 100% RAM, CPU or DISK space – so work with caution.