excellent!  This is the answer I was looking for.   While I am learning to
program PHP and MYSQL and even using Screem or other software to play around
with, I would rather not do it as root.

I guess I can find the how to configure in the Apache help files.  I will
look as soon as I get home!  



-----Original Message-----
From: Dave Sherman [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 22:40
To: [EMAIL PROTECTED]
Subject: Re: [newbie] PHP


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Under normal circumstances, only people with special permissions (like 
root) are allowed to work with the root web directory.

For normal users creating a personal website, and for people with their 
own domain hosted at their ISP, the website is actually in their home 
directory, often in a web or www subdirectory -- thus, $HOME/www or 
$HOME/web.

The apache web server is then configured to allow user web directories, 
and if a URL like 'www.ispdomain.net/~username/' is requested, apache is 
smart enough to look in /home/username/www for an index.html file, or load 
the specific file requested. PHP just goes along for the ride -- if apache 
can read from a user's home directory or www subdirectory, then so can php.

It's the same for domains hosted at a hosting company. The apache server 
is configured so that www.yourdomain.com is redirected to 
$HOME/www (or whatever). When you ftp to "your" website to upload 
files, you are actually being deposited into your home directory.

The ISP does all this configuration for you when you set up an account, so 
that it is transparent to the user. If you are hosting your own website on 
your own server, then you can either put your website in webroot, or (my 
preference) put it in your $HOME/www directory, and configure apache to 
look there for your particular domain. This approach allows you to add 
other domains later, and simply place them in their own user directories 
- -- without messing up the webroot directory.

Dave

On Monday 16 July 2001 21:05, thus spake Dennis Herndon:
> Thanks - I already know that.  I guess I'm saying that as username
> DENNIS, I want to post what I created.   When username DENNIS, try to
> copy files or create a PHP file under the webroot, I get a permission
> error.  So I cheat and log in as ROOT to do the posting and everything
> is just fine.
>
> So how users post to the apache?    When I use AOL and my website, I
> have permission to FTP my files to that directory.
> thanks.
>

- -- 
"Nihil tam munitum quod non expugnari pecunia possit." (No 
fortification is such that it cannot be subdued with money.)
- - Marcus Tullius Cicero, 106-43 B.C.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7U6WaOiMJhTaLf3MRAgkwAJ4s9RM9xjNhNLxZzR/F2Pft7kdJ/gCfV6H6
/iSggqMLBmiK7C7wtkQko+I=
=sk8X
-----END PGP SIGNATURE-----

Reply via email to