We have had a number of customers put their files in the wrong directory, i.e. /users/mainaccountname/web, instead of simply /web
And yes, of course we give clear instructions on which directory to use, but invariabley they will go poking around and come up with the incorrect "web" directory in which to load their top level web data.
My question:
What config file, and where in that config file would I alter to get the server to establish new accounts with a directory that is more typically named "public-html" rather than "web"?
Thanks!
jtan15
07-01-2001, 09:55 PM
I'm not a Cobalt expert, but I do know that it isn't good to mess with things like that on the Cobalt. Nonetheless, I'll point you in the right direction.
Open the /etc/httpd/conf/httpd.conf file. Go to the bottom of the file, and you'll see all of the vhosts for your server. You'll see a line like this in each vhost:
DocumentRoot /home/sites/site1/web
If you change this to
DocumentRoot /home/sites/site1/public_html
the public_html should now become the document root directory for site1. Then you need to change it for site2, and so on. I highly doubt this is supported by Cobalt. When you add new accounts, they'll still have "web", so you'll need to change it for each new account you setup. You can probably edit a file somewhere so that it sets it up as public_html, but that is for someone else to explain. :)
Make sure to reboot Apache once you are done:
/etc/rc.d/init.d/httpd.init restart
Originally posted by Vincent Paglione
I'm not a Cobalt expert, but I do know that it isn't good to mess with things like that on the Cobalt. Nonetheless, I'll point you in the right direction.
Open the /etc/httpd/conf/httpd.conf file. Go to the bottom of the file, and you'll see all of the vhosts for your server. You'll see a line like this in each vhost:
If you change this to...
Thanks for the effort Vincent. Yeah, what I was looking for was more in the way of altering a config file to set up new accounts as public_html, rather than having to edit the config file for the individual account as a post process.
Chicken
07-02-2001, 02:21 AM
Might be worthwhile to just set symbolic links to the user's web directory as you are correct, that's where they always put files.
cgisupp
07-02-2001, 03:01 AM
What I do is edit the Ftp.pm file so their default login is the root web directory, instead of the usual /users/username/web
Do a search on Ftp.pm here and the procedure is documented there. It basically just involves adding a single line to the perl module.
- Bruce
Originally posted by cgisupp
What I do is edit the Ftp.pm file so their default login is the root web directory, instead of the usual /users/username/web
Do a search on Ftp.pm here and the procedure is documented there. It basically just involves adding a single line to the perl module.
- Bruce
Thanks a bunch Bruce. This looks like just what the doctor ordered.