Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Although very similar, I often find key differences in locations of files in the httpd directory when install its package on different Linux distros (ie Ubuntu, CentOS/RHEL, Debian)..some have a separate directory for conf files, some include them directly in the httpd root directory, some have vhost folders for enabled/disabled sites already created, etc.

Why are there so many differences, and is there some kind of reference for these differences?

share|improve this question

migrated from stackoverflow.com Jul 11 '11 at 2:41

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers 3

up vote 4 down vote accepted

Each distro tends to generate packages that follow the distro's conventions (so Debian puts config files in /etc/apache2, the default web root in /var/www, libraries/modules in /usr/lib/apache2 and so forth). This helps to ensure that the user of a specific distro finds things in the place they would expect them to be (for example, if its a Debian box I know to look in /etc/ for config files).

There is no central reference: for each distro you will need to look at the docs for the that distro to figure out where it tries to put things.

share|improve this answer
    
sigh...love it. –  jellyfishtree Jul 10 '11 at 23:02
add comment

A standards document for Linux file systems does exist, http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard. As distributions evolve though, they end up creating their own flavour of the standard.

Just to complicate things, if you look at the config.layout file that comes with the Apache httpd source code you'll see that even it has various layouts it can use.

share|improve this answer
add comment

As long as the apache httpd instance have a master conf file , then the diretory structure for appache does not matter. All the directory structure need for apache to function are defined in the conf file or in one of the included conf files. You dotn have to follow the dir structure that distro wants you to use. You can override this by chnaging the directory structuer to the way you want it by clearing defining what is where in the conf file and making sure it is available there . Dont think apache if told to restructure will automatically move the contetn for you. it wont . it is your job to tell where each content is and you have to move contetn to the approprite locations that you want. You can even change the master conf file location and entries there to whereever you want . except that httpd process should be intimated of it, so that it can find and load appropriately. To do that use -f option with the apache binary and give the location of the master conf file. I think there cannot be more coustimizable than this software.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.