Per Andersson | 1 Oct 2010 11:38
Picon

Re: Yaws 1.88 and SSL verify

Hi again!

I was digging around in Yaws source code and eventually wound up in OTP's ssl
code. The code yaws_server:do_listen/2 eventually calls ssl:handle_options/2.
On lines 539 - 554 it looks like valid values for #ssl.verify are 0 | 1 | 2, not
1 | 2 | 3.

It might also be nice to implement the new (I think) options verify_none,
verify_peer, and, fail_if_no_peer_cert.

Best regards,
Per

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
Steve Vinoski | 2 Oct 2010 15:16
Picon
Gravatar

Re: yaws 1.89

On Thu, Sep 30, 2010 at 5:20 PM, Wes James <comptekki@...> wrote:
> if i git clone yaws from github is that the same as the release on
> yaws.hyber.org?  There is also no 1.89 tag on the github version.

Hi Wes, there have been no pushes to github since Klacke cut the 1.89
release, so yes, they're the same. Thanks for the heads-up on the tag,
we'll have to fix that.

--steve

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
Mojito Sorbet | 5 Oct 2010 16:53
Picon

PHP in embedded mode

I have a YAWS application that runs in embedded mode.  That part works
fine.  Now I need to handle some .php files as well.

I have PHP working when I run yaws in standalone mode, but in embedded
mode I get the dreaded "No input file specified" message that PHP puts
out when things are not just right.

Here is the code that sets up the gconf and sconf records.  Am I missing
some setting?

    Id = "default",
    GC1 = yaws_config:make_default_gconf(false, Id),
    GC = GC1#gconf{
      logdir = getLogdir(),
      phpexe = "/usr/bin/php-cgi",
      include_dir = ["./lib/cwares/include"]
      },
    SC = #sconf{port = getPort(),
      servername = "warehouse",
      listen = {0,0,0,0},
      allowed_scripts = ['php','yaws','cgi'],
      docroot = "./lib/cwares/priv",
      appmods = [wh]},
    yaws_api:setconf(GC, [[SC]]).

In the default yaws.conf for standalone mode, I see this line, but I am
not sure what these modules are for, or if I need to put them in my
code:

    appmods = <cgi-bin, yaws_appmod_cgi>        
(Continue reading)

Claes Wikstrom | 5 Oct 2010 21:16
Favicon

Re: Yaws 1.88 and SSL verify

On 09/30/2010 04:28 PM, Per Andersson wrote:
> Hi!
>
> I use Yaws 1.88 in embedded mode together with self-signed SSL certs.
>
> It seems that there is some discrepancy in the Yaws docs...
>
.....

> Is it so that #ssl.verify = 1  is actually 2, and 2 is actually 3?
>
>

Indeed so, thanks, fixed.

/klacke

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Claes Wikstrom | 5 Oct 2010 21:16
Favicon

Re: Yaws 1.88 and SSL verify

On 10/01/2010 11:38 AM, Per Andersson wrote:

> It might also be nice to implement the new (I think) options verify_none,
> verify_peer, and, fail_if_no_peer_cert.
>

Yes, agree.

/klacke

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Max Lapshin | 5 Oct 2010 21:28
Picon

which fork on github is right

There are some forks of yaws on github. Which one is right, or you are
not using github for development?

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Claes Wikstrom | 5 Oct 2010 21:40
Favicon

Re: PHP in embedded mode

On 10/05/2010 04:53 PM, Mojito Sorbet wrote:
> I have a YAWS application that runs in embedded mode.  That part works
> fine.  Now I need to handle some .php files as well.
>
> I have PHP working when I run yaws in standalone mode, but in embedded
> mode I get the dreaded "No input file specified" message that PHP puts
> out when things are not just right.

Irritating, and it can indeed be non-trivial to figure out how to populate
the gconf,sconf record to get it - right.
Actually, in your example, I couldn't see anything wrong allthough something
was obviously not right.

I just commited

http://github.com/klacke/yaws/commit/713e35b4c90519c9af37fde2ac45878f15b4e3e0

Which you can apply and try,

/klacke

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Steve Vinoski | 5 Oct 2010 21:54
Picon
Gravatar

Re: which fork on github is right

On Tue, Oct 5, 2010 at 3:28 PM, Max Lapshin <max.lapshin@...> wrote:
> There are some forks of yaws on github. Which one is right, or you are
> not using github for development?

http://github.com/klacke/yaws

All Yaws development is done in github.

Not sure of other forks, but I have a fork where I'm currently goofing
with some changes that I want to keep separate for now, but if they
pan out I'll bring them quickly over to the main repo above.

--steve

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Max Lapshin | 5 Oct 2010 22:00
Picon

Re: which fork on github is right

I wanted to fix this place:

http://github.com/klacke/yaws/blob/master/src/yaws_server.erl#L1073

Yaws is hidden behind nginx and I can't find out client IP and logs
are spoiled by 127.0.0.1. Maybe it would be better to fix this place
to read some nginx headers?

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Steve Vinoski | 5 Oct 2010 22:26
Picon
Gravatar

Re: which fork on github is right

On Tue, Oct 5, 2010 at 4:00 PM, Max Lapshin <max.lapshin@...> wrote:
> I wanted to fix this place:
>
> http://github.com/klacke/yaws/blob/master/src/yaws_server.erl#L1073
>
> Yaws is hidden behind nginx and I can't find out client IP and logs
> are spoiled by 127.0.0.1. Maybe it would be better to fix this place
> to read some nginx headers?
>

You're using nginx as a reverse proxy in front of Yaws, I assume. In
that case, nginx truly is the client to Yaws, so the client IP really
is 127.0.0.1:<port>. Why does that mess up the logs?

I don't think it would be right to modify the code with nginx-specific
changes, since using other web servers in a reverse proxy setup is
also possible. But I would like to understand what you'd prefer to the
current behavior just so I'm not missing something, and in case
there's something we can improve for the community.

--steve

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb

Gmane