1

I've been using Webmin/virtualmin for years. In Webmin, I can edit Apache config files quite easily. For example, if a user wants to change the DocumentRoot because he/she wants to serve up a Ruby on Rails app using Phusion Passenger, I can do that in a few seconds using the Webmin GUI.

/etc/apache/sites-available/samplesite.com.conf

Is there something similar in WHM/cPanel? How can I edit the VirtualHost (and inside that, the Document Root), using WHM/cPanel?

user55578
  • 119
  • 1
  • 2
  • This question appears to be off-topic because it is about [`working with a service provider's management interface, such as cPanel`](http://serverfault.com/help/on-topic). – HopelessN00b Jan 13 '15 at 21:39

1 Answers1

2

generally this is done via shell - /usr/local/apache ... etc

You will however need to "distill" the change if you make it - otherwise a cPanel update and/or an EasyApache update will overwrite the change.

Shoot me an example of what your trying to do - and I can step you through it - provided the battery lasts a bit longer here while my children play @ ChuckECheese ...


You will need root level access to make any changes as well as distill the change - so it sticks w/ any new updates


It appears that you do not have root level access - So this is not possible for you - furthermore - with the current state of Rails3 on cPanel - having root may not help anyhow.

Glenn Kelley
  • 1,294
  • 6
  • 10
  • I'm deploying a Rails 3 app, so I need to change the DocumentRoot. Here's what needs to be done. "Deploying a Ruby on Rails application: an example Add a virtual host to your Apache configuration file and set its DocumentRoot to /somewhere/public: ServerName www.yourhost.com DocumentRoot /somewhere/public # <-- be sure to point to 'public'! AllowOverride all # <-- relax Apache security settings Options -MultiViews # <-- MultiViews must be turned off " I do this all frequently in Webmin, but I'm lost with WHM. – user55578 Feb 20 '11 at 01:01
  • http://forums.cpanel.net/f5/mongrel-issue-when-starting-ruby-applications-using-rails-3-0-case-43320-a-163993.html#post730411 In Short - Since mongrel is being a mongrel ;-) cPanel does not hav a date to support Rails3 as of yet. Their own staff have even suggested they support mod_rails with passenger over mongrel - might want to think about your approach first. – Glenn Kelley Feb 20 '11 at 01:07
  • I've already installed Phusion Passenger and Rails 3. I won't be using cPanel to set up Rails. I just need to change the virtulhost. I tried sshing in as the user, but I wasn't able to get the virtualhost changed/setup. – user55578 Feb 20 '11 at 01:10
  • I don't have root access on this server. I have to ssh in as the user. – user55578 Feb 20 '11 at 01:22
  • Simply put - YOU CANNOT DO THIS. Since cPanel would require you to have root abilities to make the change - you cannot do this w/ the host you are using. – Glenn Kelley Feb 20 '11 at 03:54