Problem
This description applies to Froxlor 0.9.27. The issue was reported by me as Froxlor issue #1159 ("Absolute document root path interpreted as relative to customer folder"), but since their issue reporting system is down as of 2013-02-18 I publish it here with teh workaround, as good as I can remember.
How to reproduce this problem:
- Create domain with absolute docroot. As Froxlor admin, create a new domain entry in Froxlor as a "main domain". Adjust the document root setting of that new domain by using an absolute path rather than one relative to the customer directory. For example, I had to use /usr/share/phpmyadmin/ for an installation of phpMyAdmin.
- Re-create configs. For that, do one of these:
- Execute this via SSH on the server:
php /var/www/froxlor/scripts/froxlor_master_cronjob.php --force
- Wait until the next Froxlor cron job runs, which will also rewrite all vhost configs that need changes. (Clicking "Server -> Re-create configs" in Froxlor won't speed that up, it just queues additional config files for re-creation.)
- Execute this via SSH on the server:
- Restart Apache. Because the config changes will not be picked up in all cases automatically. So:
service restart apache2
- Test. The domain should have been created correctly, using your provided document root directory. Froxlor should not have created directories below the customer's directory.
- Edit as customer. Edit the settings of the domain as a the customer who owns this domain. (To switch to the customer's account as Froxlor admin, go to "Ressources -> Domains" and click on the appropriate link in the "Customer" column. A new window with a concurrent login opens. Here, navigate to "Domains -> Settings" and click the "Edit" icon for your domain.) Just change something unimportant and save the settings. Do not change the document root path!
- Re-create configs, restart Apache. See steps 2 and 3.
As a result of this process, the domain you edited will no longer work, just showing the standard Froxlor "under construction" page. Froxlor has interpreted the absolute document root directory as relative to the customer's directory, and has created a corresponding directory hierarchy there incl. the "under construction" page. This happens only when editing a domain condiguration as customer, not when doing so as root. It has only a negative effect for domains that require an absolute document root path, as the relative interpretation works just fine for the standard directory names generated by Froxlor.
Fix
Edit your domain settings as Froxlor admin and remove the customer directory path from the front of your document root path. Then re-create the configs and restart Apache as shown above. Finally remove the nonsense directories created by Froxlor because of this bug.
This fix only works for Froxlor main domains, as subdomains cannot be edited by Froxlor admins.
Workaround for prevention
Simply do not edit domains that require absolute document root paths with a Froxlor customer account. Use a Froxlor admin account. Of course this implies that with the current Froxlor 0.9.27 you cannot let your customers have domaisn with absolute document root paths, instead only with paths inside the customer directories.
For so-called "Froxlor main domains" (which can also be subdomains!), editing as admin is possible without restrictions. (The only setting not visible when editing them as admin is "Redirect code", and that one makes no sense together with an absolute document root path as it requires the document root field to contain a URL.)
For Froxlor subdomains however, editing as admin is not possible at all. They do not appear in "Ressources -> Domains" when logged in as Froxlor admin. Which means, subdoamains that require absolute document root paths must be created as Froxlor main domains to edit them as admin. If not, you're forced to change the Apache config files manually, and your changes will be lost whenever Froxlor re-generates these config files.
Leave a Reply