Web Hosting Talk







View Full Version : rename public_html folder?


md2001
07-01-2001, 03:19 AM
Is it possible to rename folder public_html? The server has CPanel/WHM installed.

I'm asking this because I have to transfer a site to that server and the site has a lot of CGI scripts. The site is currently hosted on Alabanza system where default www folder is "domain-www". So if I could could make default www folder on the new server to be "domain-www" instead of "public_html", I wouldn't have to change all the config data in CGI scripts (paths etc.). There would relly be a lot of config data to change. I need to change this for one domain only.

I was wondering if I can do this by changing the DocumentRoot entry under that domain's section in httpd.conf. Would that do it? Do I need to modify anything else? Or maybe it's not possible at all?

Thanks.

qslack
07-01-2001, 03:32 AM
You could also symlink public_html to domain-www with this command:

ln -s domain-www public_html

If you do that, then the folders' contents are identical. Also, you wouldn't have to mess around with configs.

jtan15
07-01-2001, 10:07 AM
Yeah, using a symbolic link is the best idea. It is possible to change the name of the directory, but I wouldn't recommend it, especially since you have control panel software running.

A symbolic link is the way to go.

Jag
07-06-2001, 10:55 AM
One more helpful tid bit, place that symbolic link in the skel directory so everytime you create a site it gets created automatically and you dont have to add it to each site you host.

md2001
07-06-2001, 12:43 PM
Thank you all for the replies.

I've created the symink and it works.

Jag: I don't realy have to do this because none of the other sites I'm transferring uses CGI or anything like that. It was just this one that was complicated.

Thanks again.

WebMom
07-14-2001, 05:34 PM
I was thrilled to find this thread as I'm moving a site with a lot of cgi. I've followed the command to set up a symbolic link and I know it worked because when I try to repeat the process it tells it already exists.

But when I try to use the scripts I continually get error messages. Here's an example with Gossamer Threads Links... error message:
Error including libraries: Can't locate /home/usernm/domain-www/cgi-bin/admin/db_utils.pl at /home/usernm/public_html/cgi-bin/add.cgi line 31.

Make sure they exist, permissions are set properly, and paths are set correctly.

Any ideas what I did wrong?

Thanks in advance!

jtan15
07-15-2001, 12:43 AM
You setup /home/username/domain-www to point to /home/username/public_html, correct? Could you run "ls -al /home/username" and show us the permissions and setup?

WebMom
07-15-2001, 02:45 PM
Yes, that's how I set it up. I've tried it various ways but just now tried it with the entire path as you mentioned. I entered this
ln -s /home/momtips/mommytips-www /home/momtips/public_html
and it gave the message
/home/momtips/public_html/mommytips-www': File exists

Here's the info you requested:

drwx--x--x 9 momtips momtips 4096 Jul 14 16:27 .
drwxr-xr-x 10 root root 4096 Jul 13 16:24 ..
-rw------- 1 momtips momtips 704 Jul 15 00:05 .bash_history
drwx------ 2 momtips momtips 4096 Jul 14 11:28 etc
drwxr-xr-x 4 momtips momtips 4096 Jul 14 17:26 .htpasswds
-rw-r--r-- 1 momtips momtips 34 Jul 14 17:28 .lastlogin
drwxrwx--- 6 momtips momtips 4096 Jul 14 11:30 mail
drwxr-xr-x 3 momtips momtips 4096 Jul 13 16:24 public_ftp
drwxr-xr-x 53 momtips momtips 4096 Jul 14 16:24 public_html
drwx------ 5 momtips momtips 4096 Jul 13 16:35 tmp
drwx------ 2 momtips momtips 4096 Jul 14 11:51 .trash
lrwxrwxrwx 1 momtips momtips 11 Jul 13 16:24 www -> public_html


Thanks!