Re: apache file paths
| From: | Stephen | Date: | Tue, 19 Jun 2007 19:02:19 +0000 |
| Subject: | Re: apache file paths | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257452@lists.php.net to get a copy of this message | ||
Ross <ross@aztechost.com> wrote:
>how do apache filepaths match the directories?
The answer you don't want is "however they were configured". :)
You have seen some conventions.
>This is my document root acording to $_SERVER
>/usr/local/apache/htdocs/
The "/usr/local/apache/" path is pretty common. I am seeing "htdocs" more
frequently, but have also seen "html" and "docroot". There is an entry in the
apache ini file, httpd.conf, when the document root is specified, and you can pick any directory you
like, subject to permissions, of course.
>but I also sometimes see this
>/home/mysitename/public_html/
When you have shared hosting, each user (domain) needs their own document root. These are created
in the user directory area, which by convention is called /home. On my home system home is mounted
to root, and is on its own drive. But this can vary for computer to computer.
>/usr/local/apache/htdocs/home/mysitename/public_html/
Here "home" is mounted in a rather uncommon place, but it should work.
And whether "public_html" is used or "htdocs", seems to be a choice made by the
people who created the different control panels for mantaining apache servers that are set up to do
virtual hosting.
On of apaches .conf files has all the virtual document roots, and apache really doesn't care
what the paths and directories are. (Subject again to permissioons!)
Stephen