Add Support to change the Document-Root of an Application (custom web root)
Allot of modern PHP-Application have several Web-Dir (for example Symfony, Neos etc.) So it should be possible to change the Document-Root on the PHP-Stack. Allow Symlinks as Document-Root would be also great so its possible to deploy applications via capistrano.

This is now live and you can find it in the Application Tab under the rename application folder option.
We are creating a KB for this.
Cloudways Team
-
AdminCloudways (Admin, Cloudways) commented
This is now live and you can find it in the Application Tab under the rename application folder option.
We are creating a KB for this.
Cloudways Team
-
AdminCloudways (Admin, Cloudways) commented
Custom web root feature has been started.
Cloudways Team
-
Wolfgang Freund commented
Thanks for your reply.
So when working with Magento, I (and as far as I know, this is standard in most agencies specialized in Magento) have following folder-Structure:
- .modman (for all individual developments)
. html (this is a naked, untouched magento)
- vendor (this is the folder compsoer created for community modules)So all data in .modman and vendor is symlinked to the html folder, so the magento core code is 100% untouched and updatable.
If I now upload all these folders to e.g. private_html, I need to make public_html a symlink to private_html/html to have magento bootstrap perfect.
A second case is, if we use continous integration (via capistrano, surf, etc.) then it creates following structure in private_html:
private_html/releases/current/htmlThen public_html needs to be a symlink to the above path.
I already tried the way suggested here:
https://support.cloudways.com/how-can-i-change-the-web-root-of-my-custom-php-application/But this just kills the perfomance and also the backend does not work anymore.
So it would be an incredible improvement if one can set a symlink on the folder public_html to a folder in private_html.
Not only magento would benefit, but also most applications that can use continous integration/deployments.
Thanks
-
AdminCloudways (Admin, Cloudways) commented
Wolfgang, can you elaborate on that?. Why would you want to do this symlink?. Currently you can already create symlinks to private under public_html (you can symlink the base public_html to something in private_html though).
If you can put some context into the reasoning for it and develop it further we may try to help.
Cloudways Team
-
Wolfgang Freund commented
Hi there,
I know a similar idea was already rejected. But I'd love to use Cloudways for bigger Magento projects. Perfomance is just awesome.But recent magento development is only substainable with the use of modman, composer and deployments, that need symlinking the public_html folder.
So my idea:
Please create a new application, identical to the magento one, where i can add a symlink (in the click'ngo) from public_html to for example private_html.So what I would need for example:
public_html => private_html/releases/current/html
I swear this feature will make you number one magento hoster for germany agencies...
-
Kay commented
It is not possible to have an subfolder as document-root
such as "public_html/deploy/current" or so without a redirect?
I dont see a security issue hier. -
AdminCloudways (Admin, Cloudways) commented
For security reasons allowing web root change to somewhere outside the public_html folder (the one you access via sftp) is not possible.
We have created a KB explaining how to redirect connections to a sub-folder of public_html (so, in some form, being able to use another folder as root). Many customers are sorting this need via this method:
Hope it helps.
Cloudways Team