Re: apache file paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ross <ross@xxxxxxxxxxxxx> 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux