[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [users@httpd] Re: cgi-bin stopped working in apache ?! please help SOLVED



On Thu, Sep 11, 2008 at 11:19:34AM +0200, André Warnier wrote:
> Apart from the related tip from Kris about the various virtual server  
> config files in /etc/apache2/sites-available and  
> /etc/apache2/sites-enabled, here is what I do to insure that virtual  
> servers are "included" in the correct order :
>
>
> # Include the "Generic" site definitions
> Include /etc/apache2/sites-enabled/.Generic
>
> NameVirtualHost *:80
>
> # Include the "default server" site definitions
> Include /etc/apache2/sites-enabled/.default
>
> # Include the virtual host configurations:
> Include /etc/apache2/sites-enabled/[^.#]*
>
> The first 2 includes each include a specific file, which I name with a  
> starting dot (.)
> (To make sure of the order in which those files are included)
>
> The final include then includes all the other files (through links in  
> /etc/apache2/sites-enabled/), whose names do not start with a dot  
> (because usually, apart from the default server, it does not matter in  
> which order the virtual hosts are defined).

This doesn't seem like it'd work quite like you describe.
The Apache docs say the Include directive uses "shell-style"
wildcard matching using fnmatch.[1]  Documentation i've found
on the web for fnmatch suggests that you'd want a '!' rather
than a '^'.[2][3]

That said, i wouldn't want to assume that it *doesn't* work
like you describe; maybe Apache's docs aren't quite accurate,
or maybe i'm misinterpreting them...

Oh, here we go -- it *is* documented deep in the bowels of
APR.  Apache uses apr_fnmatch [4], which is documented in
apr_fnmatch.h[5] and apparently supports both '!' and '^'.

In summary, your directive is just fine, but rather than
cancelling this message, i figure i might as well send it
along to give everyone a whole pile of links to docs.

Enjoy!
--Rob*


[1] http://httpd.apache.org/docs/2.2/mod/core.html#include

[2] http://qnxclub.net/files/articles/unix03/functions/fnmatch.html

[3] http://qnxclub.net/files/articles/unix03/utilities/xcu_chap02.html#tag_02_13_01

[4] http://svn.apache.org/viewvc/httpd/httpd/trunk/server/config.c?view=markup

[5] http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_fnmatch.h?view=markup

-- 
/-------------------------------------------------------------\
| "If we couldn't laugh we would all go insane"               |
|              --Jimmy Buffett,                               |
|                "Changes in Latitudes, Changes in Attitudes" |
\-------------------------------------------------------------/


Reply to: