Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Smart modification of httpd.conf for easier updating' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Smart modification of httpd.conf for easier updating
Authored by: gvaughn on Jul 07, '03 10:38:23AM
You don't even have to modify a single line. If you look a the bottom of the stock httpd.conf it already includes every conf file in /etc/httpd/users I learned this last year from Getting the heck out of httpd.conf

[ Reply to This | # ]
Smart modification of httpd.conf for easier updating
Authored by: TvE on Jul 07, '03 03:18:50PM
So does that mean that ALL the .conf files in /etc/httpd/users will be read by Apache?

I assumed - since there was only a tve.conf file in that directory - that these files was meant to affect the personal sites, the one each user have in http://localhost/~UserName

Now it looks to me like:
/etc/httpd/users/User-1.conf affects http://localhost/~User-1/ /etc/httpd/users/User-2.conf affects http://localhost/~User-2/ /etc/httpd/users/BlaBla.conf affects http://localhost/ Is that it???

[ Reply to This | # ]
Smart modification of httpd.conf for easier updating
Authored by: bluehz on Jul 07, '03 09:42:20PM

I don't think that anything in httpd is smart enough to discern what conf file should go with what user by the filename of the config file. I may be wrong, and I am definitely no expert on httpd.conf files. I suspect though that its whats inside the conf files themselves that will determine which dir is served, and therefore which user's site is configured with that file.



[ Reply to This | # ]
Smart modification of httpd.conf for easier updating
Authored by: extra88 on Jul 07, '03 11:49:37PM

The name of the conf file is irrelevant. The last line of httpd.conf is simply "Include /private/etc/httpd/users." Any files in that users directory (probably even if they don't end in .conf) will be treated just as if they were within the httpd.conf file itself. The user .conf files get their user specificity from their contents. Here's the first line from extra88.conf:
<Directory "/Users/extra88/Sites/">
I could rename it 88extra.conf and it would still do the same thing.

For dropping in other .conf files to the users directory, it might be a good idea to name it such that it will get processed before the real user.conf files (don't forget the alphabetizing will be case sensitive).

Unfortunately, none of this answers the question of whether you can get away with adding or enabling modules in an "Included" conf file.



[ Reply to This | # ]
Smart modification of httpd.conf for easier updating
Authored by: MtnBiker on Jul 07, '03 08:22:50PM
What about changes like this? # Was: DirectoryIndex index.html DirectoryIndex index.html index.php httpf.conf wll have it without the index.php (like the Was), is this a problem? Thanks for the hint. I am just getting some idea of what this file is about. I have modified it without much if any understanding of what is going on and this will help me track the changes

---
Hermosa Beach, CA USA

[ Reply to This | # ]