Link to home
Start Free TrialLog in
Avatar of newITguy
newITguy

asked on

Apache Document Tree?

Hi experts:

Can anyone explain about the apache document tree for me?

e.g.

Apache- cgi-bin
      - conf
      - www     -- www.primary.com -- public -- htdocs
                                   |         |
                                   |         -- cgi-bin
                                   |
                                   -- private -- htdocs
                                              |
                                              -- cgi-bin

                -- www.client.com -- public -- htdocs
                                  |         |
                                  |         -- cgi-bin
                                  |
                                  -- [user name] --public_html

I am not quite understanding the chart above:
1) Is there folder called <primary> inside <www> and then <public><private> store in <primary>?
2) Does it all html files store in <htdocs>?
3) Why are there two folders <public> and <private>? what are they for?
4) how about the <user name> folder and <public_html>? are they belong inside the <client> folder?

Or is there any good document tree distribution?

Thanks,
newITguy


 
ASKER CERTIFIED SOLUTION
Avatar of Cood
Cood
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of newITguy
newITguy

ASKER

I still don't quite undestand. actually, that is not my configuration. i just read it from book.
what kind of files they will store in the <private> folder?

Is there any common and good file tree distribution?

Thanks,
newITguy
I've also no idea for what the private folder is. I would say it's for an subdomain, because different subdomains need exactly the same directory structure and this dir has it's own htdocs and cgi-bin.

I'm using this structure, don't know if there are better ones.

domains
  abc.com
    www
      cgi-bin
      htdocs
      logs
      source
      data
      locale
    wap
      ...
  xyz.com
    www
      ...

cgi-bin - for scripts and applications
htdocs - the website itself
logs - all logs for this domain (to allow the user logfile-access, if he is in an chrooted environment)
source - files which may generate files in htdocs (xml/xsl-files for pages, or latex files which generate pdf)
data - dynamic files needed by the scripts or webpages. e.g. a php-skript, which works with data (guestbooks) needs a place to store them savely
locale - for the .po and .mo files, needed by gettext (if you host multilingual websites)

Then a configuration may look like this:

<Directory "/usr/local/httpd/domains/abc.com/www/htdocs/">
  Options +FollowSymLinks
  AllowOverride All
</Directory>

<VirtualHost 11.22.33.44>
  ServerAdmin  webmaster@abc.com
  ServerName   www.abc.com
  ServerAlias  ww.abc.com wwww.abc.com abc.com
  DocumentRoot /usr/local/httpd/domains/abc.com/www/htdocs
  ErrorLog     /usr/local/httpd/domains/abc.com/www/logs/error.log
  TransferLog  /usr/local/httpd/domains/abc.com/www/logs/transfer.log
  AgentLog     /usr/local/httpd/domains/abc.com/www/logs/agent.log
  RefererLog   /usr/local/httpd/domains/abc.com/www/logs/referer.log
  CustomLog    /usr/local/httpd/domains/abc.com/www/logs/full.log "%v %h %l %u %t \"%r\" %>s %b \"%{Referer
}i\" \"%{User-agent}i\""
</VirtualHost>

<VirtualHost 11.22.33.44>
  ServerAdmin  webmaster@abc.com
  ServerName   wap.abc.com
  ServerAlias  handy.abc.com
  DocumentRoot /usr/local/httpd/domains/abc.com/wap/htdocs
and so on ....

hello experts!
i am confused that if i let tomcat capture the docroot of apache, any defination of apache will be lost...
even the cgi...

why?

i just added a line in httpd.conf:
WebAppDeploy  ROOT warpConnection /

please help, thanks!

p.s.
i am using warp as the connector between tomcat and apache

thank you !