| |||||||||||
| |||||||||||
Linux and httpd file system layout - LAMP server
The Linux / Unix file system tree is a complex one ... but for the administrator of a LAMP server, there are just a few critical directories / areas he'll be working in most of the time. THE UNIX / LINUX FILE TREE
1. Extra software you install - perhaps a version of httpd that you've compiled yourself, MySQL, and Java and Tomcat if you're using them - go in /usr/local 2. Configuration files go in /etc 3. User's own information, and potentially the web site documents, go under /home 4. Log files, mail queues, print spools, etc., go under /var; I'm sure there's a standard and easy word to represent this grouping, but I can't come up with it 5. /tmp is an area that processes use for temporary storage, and sometimes it might need to be cleaned up 6. Process startup and shutdown scripts are kept in /etc/init.d, with symbolic links in directories such as rc3.d to control which of them are run (and in what order). THE APACHE HTTPD FILE TREE The Apache httpd server, when installed from source, defaults to a clean install in /usr/local/apache2. You'll want to move the web site, and log files too, to other areas as you configure it.
The main executable files are in the bin subdirectory (1) ... httpd - the main daemon apachectl - the daemon controller to start and stop apxs - to tell other software builds the release & config The configuration file is in the conf directory (2) ... a file called httpd.conf. Other sample files are provided too in order to help you change the daemon's behaviour easily by reference to examples. Log files (3) can be kept in the server area but they'll commonly be move out elsewhere, together with the documents and programs directories ...
The document root will be in a directory called - well - you've a big choice of name and there's no real standard - htdocs or html or www or website or public_html or httpdocs ... (4) Programs to be run under the Common Gateway Interface are placed in cgi-bin (5) ... even if they're not really binary programs very often these days, but rather scripts in Perl or Python. Directories such as data, private and include (6) are used to hold information needed as the website runs through CGI scripts or embedded languages such as PHP, but which shouldn't have their own URLs. See also Linux Web Server training Please note that articles in this section of our
web site were current and correct to the best of our ability when published,
but by the nature of our business may go out of date quite quickly. The
quoting of a price, contract term or any other information in this area of
our website is NOT an offer to supply now on those terms - please check
back via our main web site
Related Material
Web Application Deployment - Backups and File System Management Web Application Deployment - Apache httpd - Sourcing, Installation, Testing Web Application Deployment - Further httpd Configuration resource index - Deployment Solutions centre home page You'll find shorter technical items at The Horse's Mouth and delegate's questions answered at the Opentalk forum. At Well House Consultants, we provide training courses on subjects such as Ruby, Perl, Python, Linux, C, C++, Tcl/Tk, Tomcat, PHP and MySQL. We're asked (and answer) many questions, and answers to those which are of general interest are published in this area of our site. |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||