How to do ~ / public_html in a WHM / cPanel symlink

I use Rocketeer to deploy to a server running WHM / cPanel. I have a problem when I deploy my application to ~/mysite.com, where Rockteer adds the site version in ~/mysite.com/releases/GIT-COMMIT-HASHand symbolic links ~/mysite.com/currentto the latest version.

I’m trying to figure out how to make a ~/public_htmlgiven user a symbolic link to this current directory, and there seems to be a background process that breaks the symbolic link every night and recreates the standard~/public_html/cgi-bin

Is there a way around this or setting up a subdomain in cpanel to link to a home directory, which is a symbolic link?

If it depended on me, I would not use WHM / cPanel ...

+4
source share
2 answers

To prevent public_htmlevery night, the solution is to disable the alias cgi-bin script. Enabling this option allows you to perform the night process, which goes through all domains / subdomains and provides a directory there cgi-bin. If not, this will create it by breaking the symbolic link public_htmlin the process.

WHM screenshot for cgi-bin script alias

+5
source

This works, but it will change the setting for the entire server. In fact, you can disable this feature for each account.

Go to - Home "Account Features" Change your account and uncheck CGI Privilege

This is a disabled CGI for this account, and for most people this is not a problem.

+1

All Articles