Module: mod_alias
The alias module is used to specify a special document-root for a given= url-subset.
alias.url
Rewrites the document-root for a URL-subset
Default: em=pty
Example of usage:
alias.url =3D ( "/cgi-bin/" =3D> "/var/www/serve=rs/www.example.org/cgi-bin/=" )
You can add additional aliases by:
alias.url +=3D ( "/content" =3D> "/var/www/serve=rs/www.somecontent.org/" )
Important note:
As trailing slashes are stripped from the url before matching an=20alias, the alias "/content/ =3D> "/dirtocontent/" will no=t match the=20url "/content/"; it matches only something like "/content/so=mefile" or=20"/content/somesubdir/".
So in most cases you shouldn't use a trailing slash on the left sid=e (but use it on the right side!): "/content" =3D> "/dirto=content/"
Now "/content_x1/" is mapped to "/dirtocontent/_x1"=, "/content/"=20-> "/dirtocontent/" and "/content/somefile" ->=20"/dirtocontent//somefile" (yes, double slash).
If you don't use it on the right side too, "/content_x1/"= is mapped to "/dirtocontent_x1", which you probably don't wa=nt.
Hello Sal,
Thanks for the suggestions. =A0I'm using lighttpd not apache so the
config settings you suggested won't work for me, but maybe a symlink
will, or maybe I can find a solution similar to yours in the lighttpd
docs.
Sincerely,
Kenneth Grome> DocumentRoot<http://httpd.apache.org/docs/trunk/mod=/core.html#docum
> Try these examples in your server configuration file or httpd.
>
>
> There are frequently circumstances where it is necessary to allow
> web access to parts of the filesystem that are not strictly
> underneath the
>entroot>. httpd offers several different ways to accomplish this. On=> Unix systems, symbolic links can bring other parts o=f the> <http://httpd.apache.org/docs/trunk/mod/core=.html#documentroot>.
> filesystem under the DocumentRoot> For security reasons, httpd will follow symbolic lin=ks only if the> Options<http://httpd.apache.org/docs/trunk/mod/co=re.html#options>se>tting for the relevant directory includes> Alias<http://httpd.apache.org/docs/trunk/mod/m=od_alias.html#alias>d
> FollowSymLinks or SymLinksIfOwnerMatch.
>
> Alternatively, the>irective will map any part of the filesystem into the= web space. For> ScriptAlias<http://httpd.apache.org/docs/trunk/mod=/mod_alias.html#s
> example, with
>
> Alias /docs /var/web
>
> the URL http://www.example.com/docs/dir/file.html will be served
> from /var/web/dir/file.html. The
>criptalias>directive works the same way, with the additional effect<=br>> that all content located at the target path is treat=ed as> CGI<http://httpd.apache.org/docs/trunk/glossary.html#=cgi>scripts.>> AliasMatch<http://httpd.apache.org/docs/trunk/mod=/mod_alias.html#al
> For situations where you require additional flexibility, you can
> use the
>iasmatch>and
> ScriptAliasMatch<http://httpd.apache.org/docs/trunk/mod/mod_a=lias.h
>tml#scriptaliasmatch>directives to do powerful regular
> expression <http://httpd.apache.org/docs/trunk/glossary.h=tml#regex>> based matching and substitution. For= example,
>
> ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2
>
> will map a request to http://example.com/~user/cgi-bin/script.cgi=
> to the path /home/user/cgi-bin/script.cgi and will treat the
> resulting file as a CGI script.
>
> On Wed, Sep 29, 2010 at 5:46 AM, Kenneth Grome <kengrome@gmail.com>
wrote:
> > I tried moving the folder into /var/www/html and it didn't wo=rk
> > -- of course this is because I failed to change this line in my> > lighttpd.conf file at the same time in order to correct the path<=br>> > to WebDNA.fcgi:
> >
> > "bin-path" =3D> "/var/www/WebDNA/WebDNA.fcgi&qu=ot;,
> >
> > I don't know how to add a document root within the virtual se=rver
> > as you've suggested below, but I think it's going to be e=asier
> > (for now anyways) to just move the WebDNA folder back into
> > /var/www, rename it to "xxx", and make these two change=s in the
> > lighttpd.conf file then reboot:
> >
> > from:
> > server.document-root =3D "/var/www/html"
> > to:
> > server.document-root =3D "/var/www"
> >
> > from:
> > "bin-path" =3D> "/var/www/WebDNA/WebDNA.fcgi&qu=ot;,
> > to:
> > "bin-path" =3D> "/var/www/xxx/WebDNA.fcgi"=,
> >
> > Unless I've forgotten something again I think this will do wh=at I
> > want right now. =A0Then later I can figure out how to try your
> > suggestion and see if that works.
> >
> > Sincerely,
> > Kenneth Grome
> >
> > > You can give it the name you want. No restriction. Just fix =the
> > > path in your httpd.conf Also, you might keep /WebDNA outside=
> > > your webserver hierarchy adding a document root within the> > > virtual server. We did not try this yet.
> > >
> > > - chris
> > >
> > > On Sep 29, 2010, at 9:25, Kenneth Grome wrote:
> > > > Hi Chris,
> > > >
> > > > Thanks for the details.
> > > >
> > > > Can I rename the /WebDNA folder after putting it inside= my
> > > > website hierarchy? =A0Or will renaming it cause somethi=ng to
> > > > break?
> > > >
> > > > I'm thinking of renaming it so no one knows its nam=e (better
> > > > security) and it seems that if everything inside the /W=ebDNA
> > > > folder is referenced by relative paths then nothing sho=uld
> > > > break ... but maybe I'm overlooking something?
> > > >
> > > > Sincerely,
> > > > Kenneth Grome
> > > >
> > > >> Hi Ken! WebDNA.fcgi can be placed almost anywhere i=nside or
> > > >> outside the website hierarchy. For instance, you ca=n either
> > > >> place /WebDNA inside a /cgi-bin, or just inside the= website
> > > >> folder istelf. In your case, with /WebDNA outside o=f your
> > > >> website hierarchy, i don't know how =A0to acces=s
> > > >> /WebDNA/Admin/AdminPrefs.dna I would say yes, you s=hould
> > > >> either change your document root folder to /var/www= or move
> > > >> the entire /WebDNA folder inside /var/www/html
> > > >
> > > > -------------------------------------------------------=--
> > > > This message is sent to you because you are subscribed =to
> > > > the mailing list <=talk@webdna.us>.
> > > > To unsubscribe, E-mail to: <talk-leave@webdna.us>
> > > > archives: http://mail.webdna.us/list/talk@webdna.us
> > > > Bug Reporting: sup=port@webdna.us
> > >
> > > ---------------------------------------------------------
> > > This message is sent to you because you are subscribed to
> > > the mailing list <talk@=webdna.us>.
> > > To unsubscribe, E-mail to: <talk-leave@webdna.us>
> > > archives: http://mail.webdna.us/list/talk@webdna.us
> > > Bug Reporting: support@=webdna.us
> >
> > ---------------------------------------------------------
> > This message is sent to you because you are subscribed to
> > the mailing list <talk@webdn=a.us>.
> > To unsubscribe, E-mail to: <talk-leave@webdna.us>
> > archives: http://mail.webdna.us/list/talk@webdna.us
> > Bug Reporting: support@webdn=a.us
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us&g=t;.
To unsubscribe, E-mail to: <talk=-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: support@webdna.us
|
Module: mod_alias
The alias module is used to specify a special document-root for a given= url-subset.
alias.url
Rewrites the document-root for a URL-subset
Default: em=pty
Example of usage:
alias.url =3D ( "/cgi-bin/" =3D> "/var/www/serve=rs/www.example.org/cgi-bin/=" )
You can add additional aliases by:
alias.url +=3D ( "/content" =3D> "/var/www/serve=rs/www.somecontent.org/" )
Important note:
As trailing slashes are stripped from the url before matching an=20alias, the alias "/content/ =3D> "/dirtocontent/" will no=t match the=20url "/content/"; it matches only something like "/content/so=mefile" or=20"/content/somesubdir/".
So in most cases you shouldn't use a trailing slash on the left sid=e (but use it on the right side!): "/content" =3D> "/dirto=content/"
Now "/content_x1/" is mapped to "/dirtocontent/_x1"=, "/content/"=20-> "/dirtocontent/" and "/content/somefile" ->=20"/dirtocontent//somefile" (yes, double slash).
If you don't use it on the right side too, "/content_x1/"= is mapped to "/dirtocontent_x1", which you probably don't wa=nt.
Hello Sal,
Thanks for the suggestions. =A0I'm using lighttpd not apache so the
config settings you suggested won't work for me, but maybe a symlink
will, or maybe I can find a solution similar to yours in the lighttpd
docs.
Sincerely,
Kenneth Grome> DocumentRoot<http://httpd.apache.org/docs/trunk/mod=/core.html#docum
> Try these examples in your server configuration file or httpd.
>
>
> There are frequently circumstances where it is necessary to allow
> web access to parts of the filesystem that are not strictly
> underneath the
>entroot>. httpd offers several different ways to accomplish this. On=> Unix systems, symbolic links can bring other parts o=f the> <http://httpd.apache.org/docs/trunk/mod/core=.html#documentroot>.
> filesystem under the DocumentRoot> For security reasons, httpd will follow symbolic lin=ks only if the> Options<http://httpd.apache.org/docs/trunk/mod/co=re.html#options>se>tting for the relevant directory includes> Alias<http://httpd.apache.org/docs/trunk/mod/m=od_alias.html#alias>d
> FollowSymLinks or SymLinksIfOwnerMatch.
>
> Alternatively, the>irective will map any part of the filesystem into the= web space. For> ScriptAlias<http://httpd.apache.org/docs/trunk/mod=/mod_alias.html#s
> example, with
>
> Alias /docs /var/web
>
> the URL http://www.example.com/docs/dir/file.html will be served
> from /var/web/dir/file.html. The
>criptalias>directive works the same way, with the additional effect<=br>> that all content located at the target path is treat=ed as> CGI<http://httpd.apache.org/docs/trunk/glossary.html#=cgi>scripts.>> AliasMatch<http://httpd.apache.org/docs/trunk/mod=/mod_alias.html#al
> For situations where you require additional flexibility, you can
> use the
>iasmatch>and
> ScriptAliasMatch<http://httpd.apache.org/docs/trunk/mod/mod_a=lias.h
>tml#scriptaliasmatch>directives to do powerful regular
> expression <http://httpd.apache.org/docs/trunk/glossary.h=tml#regex>> based matching and substitution. For= example,
>
> ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2
>
> will map a request to http://example.com/~user/cgi-bin/script.cgi=
> to the path /home/user/cgi-bin/script.cgi and will treat the
> resulting file as a CGI script.
>
> On Wed, Sep 29, 2010 at 5:46 AM, Kenneth Grome <kengrome@gmail.com>
wrote:
> > I tried moving the folder into /var/www/html and it didn't wo=rk
> > -- of course this is because I failed to change this line in my> > lighttpd.conf file at the same time in order to correct the path<=br>> > to WebDNA.fcgi:
> >
> > "bin-path" =3D> "/var/www/WebDNA/WebDNA.fcgi&qu=ot;,
> >
> > I don't know how to add a document root within the virtual se=rver
> > as you've suggested below, but I think it's going to be e=asier
> > (for now anyways) to just move the WebDNA folder back into
> > /var/www, rename it to "xxx", and make these two change=s in the
> > lighttpd.conf file then reboot:
> >
> > from:
> > server.document-root =3D "/var/www/html"
> > to:
> > server.document-root =3D "/var/www"
> >
> > from:
> > "bin-path" =3D> "/var/www/WebDNA/WebDNA.fcgi&qu=ot;,
> > to:
> > "bin-path" =3D> "/var/www/xxx/WebDNA.fcgi"=,
> >
> > Unless I've forgotten something again I think this will do wh=at I
> > want right now. =A0Then later I can figure out how to try your
> > suggestion and see if that works.
> >
> > Sincerely,
> > Kenneth Grome
> >
> > > You can give it the name you want. No restriction. Just fix =the
> > > path in your httpd.conf Also, you might keep /WebDNA outside=
> > > your webserver hierarchy adding a document root within the> > > virtual server. We did not try this yet.
> > >
> > > - chris
> > >
> > > On Sep 29, 2010, at 9:25, Kenneth Grome wrote:
> > > > Hi Chris,
> > > >
> > > > Thanks for the details.
> > > >
> > > > Can I rename the /WebDNA folder after putting it inside= my
> > > > website hierarchy? =A0Or will renaming it cause somethi=ng to
> > > > break?
> > > >
> > > > I'm thinking of renaming it so no one knows its nam=e (better
> > > > security) and it seems that if everything inside the /W=ebDNA
> > > > folder is referenced by relative paths then nothing sho=uld
> > > > break ... but maybe I'm overlooking something?
> > > >
> > > > Sincerely,
> > > > Kenneth Grome
> > > >
> > > >> Hi Ken! WebDNA.fcgi can be placed almost anywhere i=nside or
> > > >> outside the website hierarchy. For instance, you ca=n either
> > > >> place /WebDNA inside a /cgi-bin, or just inside the= website
> > > >> folder istelf. In your case, with /WebDNA outside o=f your
> > > >> website hierarchy, i don't know how =A0to acces=s
> > > >> /WebDNA/Admin/AdminPrefs.dna I would say yes, you s=hould
> > > >> either change your document root folder to /var/www= or move
> > > >> the entire /WebDNA folder inside /var/www/html
> > > >
> > > > -------------------------------------------------------=--
> > > > This message is sent to you because you are subscribed =to
> > > > the mailing list <=talk@webdna.us>.
> > > > To unsubscribe, E-mail to: <talk-leave@webdna.us>
> > > > archives: http://mail.webdna.us/list/talk@webdna.us
> > > > Bug Reporting: sup=port@webdna.us
> > >
> > > ---------------------------------------------------------
> > > This message is sent to you because you are subscribed to
> > > the mailing list <talk@=webdna.us>.
> > > To unsubscribe, E-mail to: <talk-leave@webdna.us>
> > > archives: http://mail.webdna.us/list/talk@webdna.us
> > > Bug Reporting: support@=webdna.us
> >
> > ---------------------------------------------------------
> > This message is sent to you because you are subscribed to
> > the mailing list <talk@webdn=a.us>.
> > To unsubscribe, E-mail to: <talk-leave@webdna.us>
> > archives: http://mail.webdna.us/list/talk@webdna.us
> > Bug Reporting: support@webdn=a.us
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us&g=t;.
To unsubscribe, E-mail to: <talk=-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: support@webdna.us
DOWNLOAD WEBDNA NOW!
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...