Restore error: No <Directory> section found for mod_fcgid directives

When restoring a backed up alias subserver I get this error:

    Checking restored PHP execution mode ..
Error: No &lt;Directory&gt; section found for mod_fcgid directives
Error
-----
No &lt;Directory&gt; section found for mod_fcgid directives
-----

Restore halts after that error.

Alias server usually don't have a option in their Apache conf file so I guess this is the reason for the error.

You may download this 2 backup files which you can use to reproduce the error:

http://fuerstnet.de/kram/redirect.test-fuerstnet.de.tar.gz http://fuerstnet.de/kram/test-fuerstnet.de.tar.gz

redirect.test-fuerstnet.de.tar.gz is the one producing the error.

If possible: I would appreciate a quick + dirty fix very much because I'm currently in the process of server migration.

Thanks in advance! Bernhard

Status: 
Active

Comments

Quick fix is to change lines 197 to 199 in /usr/share/webmin/virtual-server/php-lib.pl from

$dirstr || &error("No &lt;Directory&gt; section found ",
  "for mod_fcgid directives");
push(@phpconfs, $dirstr);

to

# $dirstr || &error("No &lt;Directory&gt; section found ",
#   "for mod_fcgid directives");
$dirstr && push(@phpconfs, $dirstr);

That's an odd error, as the code that checks the PHP execution mode isn't run for alias domains at all.

Was the domain redirect.test-fuerstnet.de perhaps already in existance on the target system, but as some type other than an alias domain?

On my test system, both backup files restored just fine.

redirect.test-fuerstnet.de already was in existance on the target system. With the same configuration though. I actually got the error on other alias domains too.

If you delete redirect.test-fuerstnet.de and then re-restore it, do you get the same error message?

Yes, same error. I deleted the whole test-fuerstnet.de server and restored it using this command:

virtualmin restore-domain --no-reuid --all-features --source /backup/umzug --domain test-fuerstnet.de  --domain redirect.test-fuerstnet.de.

Output is attached.

Odd, on my systems this works just fine!

Which Virtualmin version are you running there?

It's 3.77 pro. Do you need access to the box?

Ok, I see the cause now .. this is a Virtualmin bug, but it is only triggered when you have an alias domain configured to use a Redirect to the destination domain. I have patched the code on your system to handle this case, and will include the fix in Virtualmin versions 3.79 and later..

Automatically closed -- issue fixed for 2 weeks with no activity.

Running Virtualmin 3.89 we ran into this issue attempting to migrate from one server to another. All our restore files failed with the message Restore error: No section found for mod_fcgid directives. Your suggestion to comment out lines in /usr/share/webmin/virtual-server/php-lib.pl did the trick

Here are the lines we commented out in the 3.89 version of the file: 222 #$dirstr || &error("No <Directory> section found ", 223 #"for mod_fcgid directives"); 224 #push(@phpconfs, $dirstr);

iann - was the domain this problem occurred for an alias, or a top-level virtual server?

They were all top level virtual servers.

If you validate one of these domains with a command like :

virtualmin validate-domain --domain example.com --all-features

does it report any errors?

Every virtual server returns the same error:

Apache website : Missing Apache <Directory> block for HTML directory /usr/local/fuelserve/accounts/<virtual server name>/public_html
Where <virtual server name> is the name of the virtual server.

Could you post the full <virtualhost> block from your Apache config file for one of these domains?