Clone Template's apache&php problems

Virtualmin version: 6.00

Steps to produce problem:

  1. Clone Template Settings For Sub-Servers
  2. In Apache website section, copy all settings from default server and just change DocumentRoot to /home/${USER}/public_html in Directives and settings for new websites. Btw, i needed to point to sub-server's DocumentRoot to main domain's public_html and there is no proper subsitution found in https://www.virtualmin.com/documentation/id%2Cserver_settings_and_templates so i used ${USER} (I am open to suggestions if there is a better way)
  3. If I pick Default PHP execution mode as FCGId in PHP options; getting this error while creating server:
    Performing other Apache configuration .. .. configuration failed : No section found for mod_fcgid directives at /usr/libexec/webmin/web-lib-funcs.pl line 1433.
    If i pick FPM, httpd.conf gets a wrong ProxyPassMatch setting like this: ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://localhost:800194.130.69.210:80/$1 and next httpd restart gives error.
Files: 
Status: 
Active

Comments

I think step 2 is causing problems, as it will confuse Virtualmin as to where the document root really is.

Why are you doing this exactly?

I need to point to Sub-server's DocumentRoot to main domain's public_html for using it like alias plus having SSL for it.

In that case, why not just create an alias domain?

There is 100 alias limit for SSL. And there is possibility to have more then 100 alias (wordpress multisite). Besides, having seperate logs etc is better for me.

Is the limit of 100 based on the number of domains your CA will include in the cert?

Ok, I see. We don't really have a good solution for this in Virtualmin, sorry - as you saw, using a custom home directory doesn't work. Really we need to support alias domains with their own certs, but that isn't trivial to implement.