|
|||
|
Changing base directory
Hi,
Is there a way to setup cpanel to use another base directory than the default public_html one? I need this because my CMS uses another base one, so I need to point my website base directory to another one. Thanks |
|
|||
|
Quote:
1- Edit the document root of a site by editing the '/var/cpanel/userdata/user/domain.tld file 2- Change the 'documentroot: /home/user/public_html' to your specified path, save the file and run this command. 3- /scripts/rebuildhttpdconf 4- Restart Apache.
__________________
JaguarPC |
|
|||
|
This is not the default path for all users I would like to change, this is the base path for my account I need to change.
I explain, I use drupal CMS. Drupal installs itself in /home/username/public_html/drupal directory. But I do not want to have to use as web address : http://www.mydomain.com/drupal, but instead just http://www.mydomain.com Do you understand what I mean? So how can I achieve this? Thanks Edit : I have found this on those forums, is it the same thing? 1. Locate the domain you're trying to edit in /var/cpanel/userdata/user 2. Edit your file 3. Run /scripts/ensure_vhost_includes --user=USER Last edited by Julien PHAM; 07-10-2009 at 06:56 AM. |
|
||||
|
Solution
If you are having root login details the you can change the
DocumentRoot for your domain in /etc/httpd//conf/httpd.conf file Quote:
OR If you are not having server access then please contact your domain hosting provider and ask them to change the DocumentRoot for your domain. |
|
|||
|
Quote:
otherwise run at your main domain name instead of a subfolder! ![]() Sounds more to me like you don't know what you are doing or otherwise don't know how to install your CMS program correctly! There is absolutely no need to change the layout of your web hosting account, update file folder names, or anything of the sort and it is absolutely ridiculous to suggest that you do! ![]() If you would like some assistance setting up your CMS program, I'd be glad to give you a hand with that but you don't need to go off trying to change account folder names and such! LOL ![]() Quote:
and it will install directly to your site root instead of "/drupal" which is what you are asking anyway! If you are downloading the drupal archive and installing manually, you just simply unpack the archive directly to the main /public_html folder and then go and run your standard setup and installation. Last edited by Spiral; 07-12-2009 at 03:13 AM. |
|
|||
|
Quote:
First, I was finally able to put the base directory where I want to, in /home/username/public_html/drupal Why I did that? Because it makes the upgrades of my CMS far more easy. Let me explain. I have created a drupal directory in /home/ In this drupal directory I put the different versions of drupal, such as drupal.6-11, drupal.6-12, and so on. In /home/username/public_html, there is no drupal directory, the drupal is just a symbolic link that points to /home/drupal/drupal version This way, when I upgrade drupal, I just have to unzip/untar the new drupal version in /home/drupal and to change the symbolic link to point to the new drupal version. I find it far more convenient than having to delete all files in the public_html folder then install the new drupal version and move the files elsewhere. (as by default untar the drupal puts it in a subfolder of the current folder) And this way this is easier to go back to a previous drupal version if something goes wrong while upgrading... Same thing with the sites folder, it is just a sym link so I do not have to keep this folder in the public_html folder. I prefer to have it elsewhere. And so if I need to I can delete all public_html folder without deleting my datas... Last edited by Julien PHAM; 07-11-2009 at 06:46 AM. |
|
||||
|
Quote:
![]() Quote:
Nice improvising on the symlink but if you think you have to delete files or take all those ridiculous extra steps to upgrade your Drupal installation, then the other part of my previous post statement truly does apply: Quote:
Quote:
It's clearly you who doesn't understand much per your own posts! ![]() Now if you need help installing (or upgrading) without so many weird extra steps, i'd only be too glad to assist ... Otherwise, or if you prefer, go on ahead and take 10 extra steps doing things you don't have to do, and making a lot more work for yourself in the ironic name of "making things easier"! There is no need to create extra folders, use symlinks however creative that might be, or delete any files and, the original topic of this thread -- IE: changing your account's home path which is not recommended in general under normal circumstances and especially so when there is no practical reason to do any of that in the first place! ![]() Incidentally, you do know you can extract the files from both TAR and ZIP archives without the folders, right? Last edited by Spiral; 07-12-2009 at 03:45 AM. |
|
|||
|
And what about going back to previous version? With my solution you just have to change the symlink. With your solution you have to install back the previous one. I prefer my method.
And moreover, perhaps you do not have to delete old files, but I prefer to have a clean drupal directory. So imagine if from one version to another there are some files that are not needed anymore, if you just install new drupal to the same directory, those files will still be there. Not needed but still be there. And the new drupal installation will override old files, so if I want to check how the old files look like, it is less easy. I know what I'm doing, but I prefer this symlink method. I prefer to separate the drupal install directory from the sites drupal folder as well. Before using drupal I used typo3. Typo3 used symlink a lot, and I found this very convenient. And so when I migrated to drupal I kept this symlink method. I prefer a new, fresh drupal install when I migrate to a new drupal install than overriding old files. |
|
|||
|
I have the same issue with Cpanel and Drupal (warning : newb)
The drupal site is running on www.mydomain.com/drupal I'd like it to run on www.mydomain.com At the moment i've just got it forwarding to the /drupal. Can someone provide me with simple steps on how to do this? Thanks in advance
|
|
||||
|
The questions posted to this thread do not seem to be cPanel/WHM-specific.
You may receive faster responses specific to Drupal from Drupal experts if you post to the Drupal forums. Those forums are located at: http://drupal.org/forum
__________________
- cPanel David G., Lead Forum Administrator & cPanel Technical Product Specialist Do you want 50% off your cPanel Conference Admission? View Coupon Code |
|
|||
|
Folder other than public_html
First, this is a cPanel issue because without cPanel, you just set the DocumentRoot in httpd.conf.
Second, Spiral needs to SFTU. This is a forum for cPanel newbies. Bashing people in here helps no one. I guess it helps your self-esteem, Spiral, but get a life. And you don't know what is ridiculous. Every admin has a different need and a different configuration. If you are such an expert, you would know that. No one looked to see what the real answer here is. To do what Julien PHAM is trying to do, create a file "/usr/local/apache/conf/userdata/std/2/accountname/sitename/accountname.conf". Replace 'accountname' and 'sitename' with the cpanel account name and the website name. In the file give the DocumentRoot directive for the site. Then run /scripts/rebuildhttpdconf. Then restart Apache. If you go to edit /etc/httpd/conf/httpd.conf you will find the instructions near the virtual host settings for the host you are trying to modify. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Directory mode changing by itself ? | bignose | cPanel and WHM Discussions | 0 | 03-13-2008 03:17 PM |
| How to move/change the ftp base directory ? | pstein | cPanel and WHM Discussions | 7 | 03-08-2007 01:50 PM |
| Changing Home Directory | hotsos | cPanel Newbies | 3 | 07-28-2006 11:28 PM |
| changing size of directory ?? | basic | cPanel and WHM Discussions | 3 | 02-12-2006 10:57 AM |