Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  appmods for URLs with Path=/

Guest
Posted: Sat Aug 05, 2006 8:58 pm Reply with quote
Guest
I want an URL such as www.domain.com to be picked up by an appmod.

I tried to put in the configfile:

appmods = </, mymod>

bit it did not work. Is it possible somehow ?

regards
--
Roberto Saccon

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
noss
Posted: Mon Aug 07, 2006 8:25 am Reply with quote
User Joined: 09 Oct 2005 Posts: 290
Perhaps rewrite the url so they all hit a yaws file of yours.

On 8/5/06, Roberto Saccon <rsaccon@gmail.com> wrote:
> bit it did not work. Is it possible somehow ?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message
Guest
Posted: Mon Aug 07, 2006 8:44 am Reply with quote
Guest
Roberto Saccon wrote:
> I want an URL such as www.domain.com to be picked up by an appmod.
>
> I tried to put in the configfile:
>
> appmods = </, mymod>
>
> bit it did not work. Is it possible somehow ?
>
> regards


Irritating, this used to work but it has somehow
got broken. Bug.


/klacke


--
Claes Wikstrom -- Caps lock is nowhere and
http://www.tail-f.com -- everything is under control
cellphone: +46 70 2097763

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
rsaccon
Posted: Mon Aug 14, 2006 7:16 pm Reply with quote
User Joined: 09 Aug 2006 Posts: 144
Anybody an idea how tho fix this ? (I started ot look at the source,
but couldn't figure out yet what is wrong ...)

On 8/7/06, Claes Wikstr
View user's profile Send private message
Guest
Posted: Tue Aug 15, 2006 7:23 am Reply with quote
Guest
Roberto Saccon wrote:
> Anybody an idea how tho fix this ? (I started ot look at the source,
> but couldn't figure out yet what is wrong ...)
>
> On 8/7/06, Claes Wikstr
Guest
Posted: Tue Aug 15, 2006 1:51 pm Reply with quote
Guest
On 8/15/06, Claes Wikstr
Guest
Posted: Tue Aug 15, 2006 3:09 pm Reply with quote
Guest
Jeroen "Slim" van Gelderen wrote:

> All that remains then is to redirect the logging to an erlang process
> instead of a file. There's probably an option for that, too. But what
> about /tmp? (Not a big issue, /tmp is available on memfs.)


A lot of the logging can be turned off, I'm not entirely
sure that _all_ logging can be turned off though.
The erlang error_logger can be turned off (by installing an
appropriate handler)

The access logs can be turned off etc, I do however think that
yaws will at least try to ensure that the logdir exists and
probably fail to start if it's not writeable. However, if as many
logs as possible are turned off very little will be written -
you need to test.


/klacke

--
Claes Wikstrom -- Caps lock is nowhere and
http://www.tail-f.com -- everything is under control
cellphone: +46 70 2097763

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
rsaccon
Posted: Tue Aug 15, 2006 6:53 pm Reply with quote
User Joined: 09 Aug 2006 Posts: 144
It still doesnt't work (as I would like it to work).

I just tried with CVS version and the following appmods configuration

appmods = </, mymod>


When I put anything into the URL path (e.g.: http://mydomain.com/foo )
, then mymod gets invoked. But when I have an URL with the plain
domain ( http://mydomain.com ), then I get a 404 error. Am I doing
anything wrong ?

regards
--
Roberto Saccon

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message
rsaccon
Posted: Tue Aug 15, 2006 7:04 pm Reply with quote
User Joined: 09 Aug 2006 Posts: 144
Oh, now it works, sorry for the noise (probably caused by garbage in
my browser cache).

Thanks
--
Roberto Saccon

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message
Guest
Posted: Fri Aug 18, 2006 5:52 am Reply with quote
Guest
Hmm.. I am still confused. In order to have my appmod respond to "/"
requests I had to disable the call to maybe_return_dir:

Disabling the following two lines in yaws_server.erl does the trick:
"/" -> %% special case
maybe_return_dir(ArgDocroot, GetPath);

What would be the proper way to address this?

Cheers,
-Slim

On 8/15/06, Roberto Saccon <rsaccon@gmail.com> wrote:
> Oh, now it works, sorry for the noise (probably caused by garbage in
> my browser cache).
>
> Thanks
> --
> Roberto Saccon
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>


--
Jeroen "Slim" van Gelderen - +1 242 646 8656

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
rsaccon
Posted: Fri Aug 18, 2006 6:32 am Reply with quote
User Joined: 09 Aug 2006 Posts: 144
I am now using arg_rewrite_mod (at yaws config file) to prepend a
path element to any URL which is not a static asset. Then you set
appmods to that prepended path element and you have all your requests
(except the static ones) routed to your appmod.

On 8/18/06, Jeroen Slim van Gelderen <askslim@gmail.com> wrote:
> Hmm.. I am still confused. In order to have my appmod respond to "/"
> requests I had to disable the call to maybe_return_dir:
>
> Disabling the following two lines in yaws_server.erl does the trick:
> "/" -> %% special case
> maybe_return_dir(ArgDocroot, GetPath);
>
> What would be the proper way to address this?
>
> Cheers,
> -Slim
>
> On 8/15/06, Roberto Saccon <rsaccon@gmail.com> wrote:
> > Oh, now it works, sorry for the noise (probably caused by garbage in
> > my browser cache).
> >
> > Thanks
> > --
> > Roberto Saccon
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Erlyaws-list mailing list
> > Erlyaws-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/erlyaws-list
> >
>
>
> --
> Jeroen "Slim" van Gelderen - +1 242 646 8656
>


--
Roberto Saccon

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message
Guest
Posted: Thu Aug 24, 2006 9:04 pm Reply with quote
Guest
How can you tell if something is a static asset or not?

On 8/18/06, Roberto Saccon <rsaccon@gmail.com> wrote:
> I am now using arg_rewrite_mod (at yaws config file) to prepend a
> path element to any URL which is not a static asset. Then you set
> appmods to that prepended path element and you have all your requests
> (except the static ones) routed to your appmod.
>
> On 8/18/06, Jeroen Slim van Gelderen <askslim@gmail.com> wrote:
> > Hmm.. I am still confused. In order to have my appmod respond to "/"
> > requests I had to disable the call to maybe_return_dir:
> >
> > Disabling the following two lines in yaws_server.erl does the trick:
> > "/" -> %% special case
> > maybe_return_dir(ArgDocroot, GetPath);
> >
> > What would be the proper way to address this?
> >
> > Cheers,
> > -Slim
> >
> > On 8/15/06, Roberto Saccon <rsaccon@gmail.com> wrote:
> > > Oh, now it works, sorry for the noise (probably caused by garbage in
> > > my browser cache).
> > >
> > > Thanks
> > > --
> > > Roberto Saccon
> > >
> > > -------------------------------------------------------------------------
> > > Using Tomcat but need to do more? Need to support web services, security?
> > > Get stuff done quickly with pre-integrated technology to make your job easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > _______________________________________________
> > > Erlyaws-list mailing list
> > > Erlyaws-list@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/erlyaws-list
> > >
> >
> >
> > --
> > Jeroen "Slim" van Gelderen - +1 242 646 8656
> >
>
>
> --
> Roberto Saccon
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Fri Aug 25, 2006 2:51 pm Reply with quote
Guest
That would depend on your application.

Perhaps in your application every path ending in .jpg refers to a
static image to be served from a filesystem. OTOH if your app
dynamically generates its JPEG files this would not be appropriate.

In some applications every URL starting with /images/ and /css/ refers
to a static file but all other requests are dynamic. Etc. Etc.

In my case I MUST make all filesystem access policy decisions in my
appmod. I cannot allow Yaws to even think about accessing my docroot
except when explicitly instructed to do so by my appmod. So I would
opt for rewriting *all* paths and having my appmod instruct Yaws to
serve assets from the docroot as necessary (if any).

Reason I was hoping to do this with a catch-all appmod is that it
seemed the simplest/cleanest design. Having one appmod catch
everything would completely rule out any unintentional filesystem
access Yaws. However, due to the way Yaws handles its appmod rewriting
that seems to be impossible to do cleanly with a few lines of code
ATM.

Cheers,
-Slim


On 8/24/06, Martin Logan <martinjlogan@gmail.com> wrote:
> How can you tell if something is a static asset or not?
>
> On 8/18/06, Roberto Saccon <rsaccon@gmail.com> wrote:
> > I am now using arg_rewrite_mod (at yaws config file) to prepend a
> > path element to any URL which is not a static asset. Then you set
> > appmods to that prepended path element and you have all your requests
> > (except the static ones) routed to your appmod.
> >
> > On 8/18/06, Jeroen Slim van Gelderen <askslim@gmail.com> wrote:
> > > Hmm.. I am still confused. In order to have my appmod respond to "/"
> > > requests I had to disable the call to maybe_return_dir:
> > >
> > > Disabling the following two lines in yaws_server.erl does the trick:
> > > "/" -> %% special case
> > > maybe_return_dir(ArgDocroot, GetPath);
> > >
> > > What would be the proper way to address this?
> > >
> > > Cheers,
> > > -Slim
> > >
> > > On 8/15/06, Roberto Saccon <rsaccon@gmail.com> wrote:
> > > > Oh, now it works, sorry for the noise (probably caused by garbage in
> > > > my browser cache).
> > > >
> > > > Thanks
> > > > --
> > > > Roberto Saccon
> > > >
> > > > -------------------------------------------------------------------------
> > > > Using Tomcat but need to do more? Need to support web services, security?
> > > > Get stuff done quickly with pre-integrated technology to make your job easier
> > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > > _______________________________________________
> > > > Erlyaws-list mailing list
> > > > Erlyaws-list@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/erlyaws-list
> > > >
> > >
> > >
> > > --
> > > Jeroen "Slim" van Gelderen - +1 242 646 8656
> > >
> >
> >
> > --
> > Roberto Saccon
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Erlyaws-list mailing list
> > Erlyaws-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/erlyaws-list
> >
>


--
Jeroen "Slim" van Gelderen - +1 242 646 8656

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum