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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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/ww w/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/a bc.com/www /htdocs
ErrorLog /usr/local/httpd/domains/a bc.com/www /logs/erro r.log
TransferLog /usr/local/httpd/domains/a bc.com/www /logs/tran sfer.log
AgentLog /usr/local/httpd/domains/a bc.com/www /logs/agen t.log
RefererLog /usr/local/httpd/domains/a bc.com/www /logs/refe rer.log
CustomLog /usr/local/httpd/domains/a bc.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/a bc.com/wap /htdocs
and so on ....
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/
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/a
ErrorLog /usr/local/httpd/domains/a
TransferLog /usr/local/httpd/domains/a
AgentLog /usr/local/httpd/domains/a
RefererLog /usr/local/httpd/domains/a
CustomLog /usr/local/httpd/domains/a
}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/a
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 !
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 !
ASKER
what kind of files they will store in the <private> folder?
Is there any common and good file tree distribution?
Thanks,
newITguy