-1

I've set up cloud9 IDE so that it logs into my digital ocean droplet as root, using an ssh key.

The "workspace folder" that i can use inside cloud9 IDE becomes

/root 

so if I want to use the IDE with laravel I'll have to create a new laravel project folder at

/root/newProject

The trouble is, apache2 requires my files be at

/var/www/html

which is out of scope for Cloud9 IDE. While the IDE can function well as an ssh client, using it this was misses out on all the functionality the IDE offers, like the ACE text editor and being able to test run the application within the IDE.

Does anyone have experience reconciling these platforms? What can I do to have full access to the server from within cloud9, particularly being able preview the app from within the IDE?

ridthyself
  • 101
  • 4

1 Answers1

3

I've set up cloud9 IDE so that it logs into my digital ocean droplet as root, using an ssh key.

Forget about all of your other issues and solve this first. There is absolutely zero reason to be signing into your server as root via ssh. Set PermitRootLogin no in your sshd_config. You do not need root privileges to deploy a web application. If you ever do need root privileges, sign in as a non-privileged user and then use sudo.

The trouble is, apache2 requires my files be at

/var/www/html

No it doesn't. That's just the default location. Just edit your vhost to point to any location of your choosing that the apache user has read access to.

EEAA
  • 109,363
  • 18
  • 175
  • 245