| Author |
Message |
|
| Guest |
Posted: Fri Dec 18, 2009 10:58 pm |
|
|
|
Guest
|
Hi again,
I use virtual directories since yaws 1.77 by using the the arg_rewrite function from the old yaws_vdir module.
This module is no more provided in the yaws releases. And the vdir example in documentation always use it.
Again, I missing something ?
thank you
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Dec 21, 2009 10:20 am |
|
|
|
Guest
|
wde wrote:
> Hi again,
>
> I use virtual directories since yaws 1.77 by using the the arg_rewrite function from the old yaws_vdir module.
>
> This module is no more provided in the yaws releases. And the vdir example in documentation always use it.
>
> Again, I missing something ?
I think you are - the vdir feature was added quite some time ago, however it's poorly
documented.
The yaws.conf man page says:
Finally an example with virtual directories, vdirs.
<server server.domain>
port = 80
listen = 192.168.128.31
docroot = /var/yaws/www
arg_rewrite_mod = yaws_vdir
<opaque>
vdir = "/virtual1/ /usr/local/somewhere/notrelated/to/main/docroot"
vdir = "/myapp/ /some/other/path can include/spaces"
vdir = "/icons/ /usr/local/www/yaws/icons"
</opaque>
</server>
The first defined vdir can then be accessed at or under
http://server.domain/virtual1/ or http://server.domain/virtual1
AFAIK, that is all you need to do, the yaws_vdir module was removed long ago.
> And the vdir example in documentation always use it.
>
Which docs ?
/klacke
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Dec 21, 2009 10:24 am |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Mon Dec 21, 2009 12:38 pm |
|
|
|
Guest
|
mmm I don't understand,
If the configuration you set the arg_rewrite_mod to "yaws_vdir" but if this module does not exist how can that work ?
======= le 21/12/2009, 11:19:36 vous |
|
|
| Back to top |
|
| Guest |
Posted: Mon Dec 21, 2009 2:23 pm |
|
|
|
Guest
|
wde wrote:
> mmm I don't understand,
me neither
>
> If the configuration you set the arg_rewrite_mod to "yaws_vdir" but if this module does not exist how can that work ?
>
I think that in the initial, absolutely first attempts at implementing
vdirs, the guy who did that work - Julian Noble - first had it implemented
as an arg_rewite module (called yaws_vdir), but it was later changed to be
become entirely integrated into yaws_server.erl
?
/klacke
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Dec 21, 2009 3:46 pm |
|
|
|
Guest
|
so I tried this :
docroot is in /tmp/www
xen:/tmp# mkdir www
xen:/tmp# echo "welcome home" > www/index.html
xen:/tmp# mkdir www/test
xen:/tmp# echo "welcome test" > www/test/index.html
-------------------
TEST 1 :
Yaws configuration is :
<server localhost>
port = 8081
listen = 0.0.0.0
docroot = /tmp/www
dir_listings = false
statistics = true
arg_rewrite_mod = yaws_vdir
<opaque>
vdir = "/virtual/ /tmp/www/test/"
</opaque>
</server>
RESULT 1 :
=ERROR REPORT==== 21-Dec-2009::16:02:49 ===
Yaws process died: {undef,
[{yaws_vdir,arg_rewrite,
[{arg,#Port<0.955>,
{{192,168,1,2},1569},
{headers,"keep-alive",
"text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
Normal yaws_vdir does not exist ! :+) (It's the original reason of my post)
-----------------------------
TEST 2
Yaws configuration is :
<server localhost>
port = 8081
listen = 0.0.0.0
docroot = /tmp/www
dir_listings = false
statistics = true
<opaque>
vdir = "/virtual/ /tmp/www/test/"
</opaque>
</server>
Try a request on "/" :
=> "welcome home"
OK !
Try a request on "/test" :
=> "welcom test"
OK !
Try a request on "/virtual" :
Not Found
The requested URL /virtual was not found on this server.
NOK !
Try a request on "/virtual/" :
Not Found
The requested URL /virtual/ was not found on this server.
NOK !
Try a request on "/virtual/index.html" :
Not Found
The requested URL /virtual/ was not found on this server.
NOK !
---------------------------------------
yaws_server source code :
vdirpath/3 find the longest virtual path based on opaque configuration
vdirpath/3 is called by two functions :
-> ssi/6 : not concerned
-> mappath/3 : more interesting
And mappath is called by yaws_cgi module only.
So I have two solutions :
-> I become crazy
-> I try to use symlinks !!!! Even if I a request on the symlink do an I/O on inodes table. Yaws file caching system should limit this.
======= le 21/12/2009, 15:22:23 vous |
|
|
| Back to top |
|
| Guest |
Posted: Mon Dec 21, 2009 4:40 pm |
|
|
|
Guest
|
wde wrote:
>
>
> so I tried this :
>
Sigh - I'm an idiot. (Ughhh, that hurt)
I removed the yaws_vdir.erl modules some time ago, I though it
was not needed any more - I was wrong.
Anyway, It last appeared in 1.84 (I attach the source here, you
can just drop it in the src directory)
/klacke
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Dec 21, 2009 5:18 pm |
|
|
|
Guest
|
no problem, but I conclude that I am the only one to use virtual directories :+)
your proposition to use symlinks sounds good, in fact I don't want to add too much overhead
thank you for your time
======= le 21/12/2009, 17:40:06 vous |
|
|
| Back to top |
|
| Guest |
Posted: Mon Dec 21, 2009 9:10 pm |
|
|
|
Guest
|
wde wrote:
> no problem, but I conclude that I am the only one to use virtual directories :+)
I guess you conclude rightly ...
/klacke
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Dec 22, 2009 9:49 am |
|
|
|
Guest
|
Maybe not..
I recall that I had to do some fixes for the yapp handler (Yaws APPlications) when vdirs were introduced. These changes are still in place, although not using the yaws_vdirs module directly. Since yapps still seem to work I guess yaws_server is still handling the {"vdir",..} tuple.
Snippet from arg_rewrite in yapp.erl which rewrites the docroot:
|
|
|
| Back to top |
|
| Guest |
Posted: Wed Dec 23, 2009 9:47 am |
|
|
|
Guest
|
Mikael Karlsson wrote:
> Maybe not..
> I recall that I had to do some fixes for the yapp handler (Yaws
> APPlications) when vdirs were introduced. These changes are still in
> place, although not using the yaws_vdirs module directly. Since yapps
> still seem to work I guess yaws_server is still handling the {"vdir",..}
> tuple.
Ok - thanks, all the more reason to have a deep look at the vdir feature.
/klacke
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| wuji |
Posted: Mon Sep 17, 2012 7:27 am |
|
|
|
User
Joined: 10 Aug 2012
Posts: 654
|
is too afraid to borrow the money," says Chai Ling, Ling, cheap replica designer *beep* Ling, "because she has no idea how she could pay
back." Nor does she have any guarantee the government won't won't [h4]jordan 11[/h4] won't ask for more money in the future. "That is
psychological pressure she is under," says Chai Ling. "It becomes becomes jordan concord becomes a money making operation for the government."Cao told ABC
she very much wanted to keep her baby, but she she cheap jordan shoes she was unsure of what do to. For Cao, waiting
the Saturday deadline is torture, but every moment is also also [h3]jordan concord[/h3] also precious for the expectant mother.Obama Defends Immigrant Deportation Rules
as PoliticalThe President Announces a Change Likely to Please Hispanic Hispanic cheap replica designer *beep* Hispanic VotersBy MATT NEGRIN AND PIERRE THOMASJune 15, 2012 President |
|
|
| Back to top |
|
|
|