Does Apache allow directories imbrication?

Does Apache allow directories imbrication?

am 12.05.2007 15:00:47 von geometris

Is this possible with Apache: writing a directory inside another
directory so that the structure is easier to understand ?


ServerName www.verygoodsite.com
DocumentRoot "C:/Apache2/verygoodsite/www"
# root of www.verygoodsite.com

# some directives
# (...)
# a subdirectory : Is this possible here below?

# some overriding directives for the subdirectory
# (...)


Re: Does Apache allow directories imbrication?

am 12.05.2007 15:26:01 von shimmyshack

On May 12, 2:00 pm, geomet...@fastmail.fm wrote:
> Is this possible with Apache: writing a directory inside another
> directory so that the structure is easier to understand ?
>
>
> ServerNamewww.verygoodsite.com
> DocumentRoot "C:/Apache2/verygoodsite/www"
> # root ofwww.verygoodsite.com
>
> # some directives
> # (...)
> # a subdirectory : Is this possible here below?
>
> # some overriding directives for the subdirectory
> # (...)
>

>

>


nesting isnt allowed, although this would make my config files harder
to read in a way because there are so many of these things.
By the way, think about the naming convention for your URLs, do you
really want cgi-bin there, when later you might change your way of
thinking and start to use new methods. Your old URIs would have to
change to reflect this, have you thought of using rewrites to go to
the "scripts" folder - whatever you call it, so that the underlying
tech is not exposed at all? (for instance I removed my cgi-bin and
call the place where that kind of thing comes from something entirely
different, then if things need to post there they get rewritten
method="post" action="/form/contact/"
-->/scripts_folder/contact.cgi
or whatever.
later the rewrite can be altered while your filesystem might change to
reflect some new technology.

Re: Does Apache allow directories imbrication?

am 12.05.2007 18:55:06 von geometris

On 12 mai, 15:26, shimmyshack wrote:
> On May 12, 2:00 pm, geomet...@fastmail.fm wrote:
>
>
>
> > Is this possible with Apache: writing a directory inside another
> > directory so that the structure is easier to understand ?
>
> >
> > ServerNamewww.verygoodsite.com
> > DocumentRoot "C:/Apache2/verygoodsite/www"
> > # root ofwww.verygoodsite.com
> >
> > # some directives
> > # (...)
> > # a subdirectory : Is this possible here below?
> >
> > # some overriding directives for the subdirectory
> > # (...)
> >

> >

> >

>
> nesting isnt allowed, although this would make my config files harder
> to read in a way because there are so many of these things.
> By the way, think about the naming convention for your URLs, do you
> really want cgi-bin there, when later you might change your way of
> thinking and start to use new methods. Your old URIs would have to
> change to reflect this, have you thought of using rewrites to go to
> the "scripts" folder - whatever you call it, so that the underlying
> tech is not exposed at all? (for instance I removed my cgi-bin and
> call the place where that kind of thing comes from something entirely
> different, then if things need to post there they get rewritten
> method="post" action="/form/contact/"
> -->/scripts_folder/contact.cgi
> or whatever.
> later the rewrite can be altered while your filesystem might change to
> reflect some new technology.

I hardly understand your answer as in the above example is no cgi-bin
directory, just a subdirectory of the ''www' one, where I store
images. For all directories other than the document root, I often use
Alias and ScriptAlias. I have few there are few subdirectories in the
''www' one and I try to set all pathes relatively. I use Alias and
ScriptAlias every time that a folder could move.

Re: Does Apache allow directories imbrication?

am 12.05.2007 19:02:54 von shimmyshack

On May 12, 5:55 pm, geomet...@fastmail.fm wrote:
> On 12 mai, 15:26, shimmyshack wrote:
>
>
>
> > On May 12, 2:00 pm, geomet...@fastmail.fm wrote:
>
> > > Is this possible with Apache: writing a directory inside another
> > > directory so that the structure is easier to understand ?
>
> > >
> > > ServerNamewww.verygoodsite.com
> > > DocumentRoot "C:/Apache2/verygoodsite/www"
> > > # root ofwww.verygoodsite.com
> > >
> > > # some directives
> > > # (...)
> > > # a subdirectory : Is this possible here below?
> > >
> > > # some overriding directives for the subdirectory
> > > # (...)
> > >

> > >

> > >

>
> > nesting isnt allowed, although this would make my config files harder
> > to read in a way because there are so many of these things.
> > By the way, think about the naming convention for your URLs, do you
> > really want cgi-bin there, when later you might change your way of
> > thinking and start to use new methods. Your old URIs would have to
> > change to reflect this, have you thought of using rewrites to go to
> > the "scripts" folder - whatever you call it, so that the underlying
> > tech is not exposed at all? (for instance I removed my cgi-bin and
> > call the place where that kind of thing comes from something entirely
> > different, then if things need to post there they get rewritten
> > method="post" action="/form/contact/"
> > -->/scripts_folder/contact.cgi
> > or whatever.
> > later the rewrite can be altered while your filesystem might change to
> > reflect some new technology.
>
> I hardly understand your answer as in the above example is no cgi-bin
> directory, just a subdirectory of the ''www' one, where I store
> images. For all directories other than the document root, I often use
> Alias and ScriptAlias. I have few there are few subdirectories in the
> ''www' one and I try to set all pathes relatively. I use Alias and
> ScriptAlias every time that a folder could move.

Sorry, that was my fault I was referring to another post where you use
cgi-bin, apologies.
ScriptAlias is a directive that has seen its day really, consider
setting permissions and directives as required on a directory that
isnt called by the name of the technology that is inside it.
I shouldnt have mentioned it really, its just a hint from an article
about maintaining URIs unchanged "cool URIs dont change - wc3" so I
added it.
For instance I do use various technologies but they are all behind the
scenes, so that if I start using some perl/python on a page, the URI
doesnt reflect this, the URI is memorable for humans, descriptive with
an eye for history and doesnt give anything away ;)