Virtualmin: Domain, FQDN, DNS, POSTFIX, Apache2, SuEXEC in /home and not /var/www/ on Ubuntu 16.04.1 LTS

1 post / 0 new
#1 Sat, 11/12/2016 - 03:37
mrrobot

Virtualmin: Domain, FQDN, DNS, POSTFIX, Apache2, SuEXEC in /home and not /var/www/ on Ubuntu 16.04.1 LTS

I running Virtualmin on Ubuntu 16.04.1 LTS and before I share my experiences I have a question.

How I can serve (mydomain.tld) from /home/mydomain.tld ?

My FQDN is bot.mydomain.tld at xx.xxx.xxx.xxx running BIND (DNSSEC, DMARC..) and POSTFIX (postfix working [no dovecot, no pop3, no imap] I can send and receive messages from and to mrrobot@bot.mydomain.tld get it over TLS (mrrobot@mydomain.tld). Everything was perfect until I dint used suEXEC (apache2-suexec-custom) and changed the directory from /var/www/ to /home. Now mydomain.tld shows 403 Forbidden even if I cp to /home and sudo chown www-data:www-data /home/mydomain.tld

403 Forbidden From /etc/apache2/sites-available/mydomain.tld.conf Directory
           Options FollowSymLinks
           AllowOverride None
/Directory Directory /home/mrrobot/public_html/mydomain.tld
          Options Indexes FollowSymLinks MultiViews
          AllowOverride All
          Order allow,deny
          allow from all
/Directory From /etc/apache2/apache2.conf Directory
    Options FollowSymLinks
    AllowOverride None
    Require all denied
/Directory Directory /usr/share
   AllowOverride None
    Require all granted
/Directory Directory /home/mrrobot/public_html
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
/Directory

.. your system is ready for use by Virtualmin.

How to serve mydomain.tld from a subdirectory of /home, example /home//public_html/mydomain.tld? (=user) [/home/mrrobot/public_html/mydomain.tld]