VMware ESXi Datastore doesn't mount automatically after reboot

Issue

VMware ESXi 5.5.0 datastore does not mount automatically after VM host server is rebooted. You can obviously manually add the datastore, but this doesn't resolve the main issue, which is that all VMs hosted on that datastore go offline if VM host is restarted or recovers from a power cut.

VMware ESXi - enlarge virtual disk

Increasing size of a virtual disk in VMware ESXi is pretty simple process.

  • Open VMware ESXi vSphere Client
  • Right click on the virtual machine that holds the disk in question and select "Edit Settings"
  • Select the Hard Disk in question and change "Provisioned Size" to the required size
    Mware ESXi Virtual Machine Properties
  • Click OK

Sendmail won't send emails on CentOS 7 (Permission denied)

Issue

Apache on CentOS 7 can't send emails via Sendmail. Website front-end displays following error:

Could not execute: /usr/sbin/sendmail

/var/log/maillog file shows following error:

sendmail[2450]: NOQUEUE: SYSERR(apache): /etc/mail/sendmail.cf: line 0: cannot open: Permission denied

Host multiple websites on Apache in CentOS

This tutorial shows how to setup Apache Virtual Hosts in CentOS 7. This is useful if you want to host more than one website on a single CentOS web server. For instructions on how to setup Apache, PHP, and SQL database on CentOS 7, check this article

Setup folder structure for your websites

We are going to create 2 folders for each website. The first will hold HTML and other content, second - log files.

/var/www/sites/domain1/html
/var/log/httpd/domain1

/var/www/sites/domain2/html
/var/log/httpd/domain2

/var/www/sites/domain3/html
/var/log/httpd/domain3

Log files will be stored in var/log/httpd/... subfolders, which is the default place to store log files in Linux. People often store Apache log files in /var/www/ subfolders, but in CentOS with SELinux enabled this can cause access denied errors. This can be fixed with chcon command, but I prefer to store all my log files in /var/logs... 

You can also place index.html files with some sample text in each html directory which we'll use later for testing.



Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait