4

I'm using Rocketeer for deployment on a server that is powered by WHM/cPanel. I'm having an issue where I'm deploying my app to ~/mysite.com where Rockteer adds a version of the site in ~/mysite.com/releases/GIT-COMMIT-HASH and symlinks ~/mysite.com/current to the latest release.

I'm trying to figure out how to make ~/public_html for a given user a symlink to this current directory and there seems to be a background process that breaks the symlink every night and recreates the standard ~/public_html/cgi-bin

Is there a way to work around this or setup a subdomain in cpanel to reference a home directory which is a symlink?

If it were up to me, I wouldn't be using WHM/cPanel...

Ben
  • 60,438
  • 111
  • 314
  • 488

2 Answers2

5

To prevent public_html from being "recreated" each night, the solution is to disable the cgi-bin script alias. Enabling this enables a nightly process that goes through all domains/subdomains and ensures there's a cgi-bin directory. If not, it'll create it, breaking the public_html symlink in the process.

WHM screenshot for cgi-bin script alias

Ben
  • 60,438
  • 111
  • 314
  • 488
1

This works, but it will change that setting for the entire server. You can actually disable this feature on a per-account basis as well though.

Go to - Home »Account Functions »Modify an Account and uncheck CGI Privilege

This disabled CGI for that account and for most people this isn't an issue.

Goddard
  • 2,863
  • 31
  • 37