0

I'm trying to use Capistrano to deploy a PHP-based website to shared hosting for a client. I want to keep everything version controlled, but they're on shared hosting with cPanel (Bluehost) and I'm not able to change the DocumentRoot to point to the "current" symlink. Deploying to public_html is fine, but I need to have the website point to the current release at the root.

Is there any way around this so I can continue to use Capistrano and also have the "current" release as the root of the primary domain name?

2 Answers2

2

It's probably too late but I've got your answer.

If your server is managed by cPanel, you can change the documentroot line in this config file:

/var/cpanel/userdata/USERNAME/DOMAIN.COM

Then you can change it to: /home/USERNAME/public_html/current.

Guilhem Soulas
  • 1,975
  • 2
  • 18
  • 30
  • If you are on shared hosting chances are you don't have write permissions to do that. See if support can do it for you. – Z. Zlatev Jul 26 '14 at 05:52
0

Welcome to my world ... or vice versa?

It's an old post, but the issue is still there. cPanel doesn't allow a different root folder for the main domain. It does for addon domains, though.

The /var/ folder isn't accessible on shared hosting.

Currently, it seems to be possible to simply delete public_html in the account and replace it by the current symlink. We've been doing that via bitbucket pipeline for a while and it works (although the hoster was cautious at first).

Urs
  • 4,984
  • 7
  • 54
  • 116