You are not logged in.

#1 2006-08-20 13:05:28

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Where to install website files for Apache

Apache newbie here, with a basic question - is there a standard or recommended directory that I should use for a website's files? I'm packaging WebGUI, and in the process getting my feet wet with Apache for the first time (well, it had to happen sometime, I suppose smile ). The WebGUI walkthrough suggests I create a new directory under / called /data, and use a subdir under that as DocumentRoot. This works, but I'm wondering is it regarded as OK to create random directories under / like that, or should I be using /home/httpd or something like that?

Offline

#2 2006-08-20 16:38:48

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Where to install website files for Apache

Hi Tomk,
IMHO it's better to create a dir under /home/httpd/html which is the default DocumentRoot for Apache.

Offline

#3 2006-08-20 17:22:01

mr.MikyMaus
Member
From: disabled
Registered: 2006-03-31
Posts: 285

Re: Where to install website files for Apache

Hi!

    Linux's, or better, any UN*X's directory structure depends entirely on system's administrator (freedom of choice;) ). Noone forces you to have all binaries in /bin or /usr/bin. You can even follow some nasty examples like /Program Files/ smile

    There are however some recommendations (you may even consider them standards) of how should a UN*X compilat system's directory structure look like. It is nicely described at http://www.tuxfiles.org/linuxhelp/linuxdir.html.

    Therefore I would place my local web pages in /var/www (I do in fact, just not on my laptop from which I am writing right now:))

    There is one custom, which is common on multiuser systems: If a user wants have his web pages on that server, he can simply create a directory in his home directory (the name of the directory is defined by sysadmin, but mostly it is '$HOME/public_html') and put all his webpages there. Those pages are then accessible via url like http://serverdomain.org/~username. This feature however requires some slight tweaking in Apache settings (not sure how much tweaking, since I do not use it, but it can be pretty simple, like uncommenting a line in httpd.conf:) )

   Hope this post is useful;)

-M.


What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...

... and who is general Failure and why is he reading my harddisk?

Offline

#4 2006-08-21 09:08:49

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Where to install website files for Apache

I've sorted it out now. Apache unfamiliarity, along with an overlooked but essential step in the WebGUI setup, led to confusion.

Thanks for your replies.

Offline

#5 2006-08-23 22:39:19

cromero
Member
From: seattle
Registered: 2006-07-22
Posts: 22

Re: Where to install website files for Apache

just wondering why building apache with /home/httpd as datadir instead of the (almost default) /var/www. This turns a little annoying when installing a apache server that is also a ldap client for example.

Offline

Board footer

Powered by FluxBB