You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tom Evans <te...@googlemail.com> on 2011/02/09 16:12:50 UTC

[users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

On Wed, Feb 9, 2011 at 2:59 PM, Zeno Davatz <zd...@gmail.com> wrote:
> Dear Tom
>
> Thank you for your reply.
>
> Yes, it seems so, as my index.rbx is not being loaded AFAICT.
>
> According to my understanding the above setup should work, but it does
> not work as the page is not served but I just get the following error:
>
> [client 127.0.0.1] Attempt to serve directory: C:/Users/zdavatz/de.oddb.org/doc/
>
> and the page in the browser tells me
>
> Not Found - The requested URL / was not found on this server. But it
> is there. The directory is there as well and index.rbx is in the
> directory C:/Users/zdavatz/de.oddb.org/doc/
>
> To my Linux understanding this should work on Apache for Windows as well.
>
> Best
> Zeno
>

(why are we talking on dev@ btw, this seems clearly a users@
discussion. If/when you reply, please drop dev@)

OK, there are some inconsistencies in your conf.

First, in your vhost configuration, you have SetHandler ruby-object at
the top level. This *will* set the handler for all requests to the
vhost to use handler ruby-object. All requests. Including for files,
directory indexes, and so on...

Secondly, in the directory where I expect you probably do want to have
ruby-object as the handler, you tell apache to execute *.rbx as
cgi-script. I thought this whole exercise was to have them executed by
mod_ruby..

Finally, having found that bug report, you seem to be trying hard to
trigger it! In the bug report you linked to us, there is a good
work-around listed by wrowe@ - why not use that?

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Zeno Davatz <zd...@gmail.com>.
Dear Tom

On Wed, Feb 9, 2011 at 4:12 PM, Tom Evans <te...@googlemail.com> wrote:

> (why are we talking on dev@ btw, this seems clearly a users@
> discussion. If/when you reply, please drop dev@)
>
> OK, there are some inconsistencies in your conf.
>
> First, in your vhost configuration, you have SetHandler ruby-object at
> the top level. This *will* set the handler for all requests to the
> vhost to use handler ruby-object. All requests. Including for files,
> directory indexes, and so on...

What do you mean by top level?

Sorry, I do not understand what you are trying to say. I also tried
this vhosts.conf setting with the same result. As said this setting
works on Linux (without the

<Files "*">
                SetHandler ruby-object
        </Files>.

https://gist.github.com/818654

> Secondly, in the directory where I expect you probably do want to have
> ruby-object as the handler, you tell apache to execute *.rbx as
> cgi-script. I thought this whole exercise was to have them executed by
> mod_ruby..

So where you that be in your opinion? Can you be a bit more specific please.

> Finally, having found that bug report, you seem to be trying hard to
> trigger it! In the bug report you linked to us, there is a good
> work-around listed by wrowe@ - why not use that?

I just sent a Mail to users@

That solution does not seem to work, see this: https://gist.github.com/818654

Best
Zeno

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Eric Covener <co...@gmail.com>.
On Wed, Feb 9, 2011 at 11:07 AM, Zeno Davatz <zd...@gmail.com> wrote:
> Dear Tom
>
> On Wed, Feb 9, 2011 at 4:12 PM, Tom Evans <te...@googlemail.com> wrote:
>
>> (why are we talking on dev@ btw, this seems clearly a users@
>> discussion. If/when you reply, please drop dev@)
>
> It seems a dev issue because what works on Linux does not seem to work
> on Apache for Windows. That is why I sent this to dev@ as well.

Stop copying the development list.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Zeno Davatz <zd...@gmail.com>.
Dear Tom

On Wed, Feb 9, 2011 at 6:01 PM, Tom Evans <te...@googlemail.com> wrote:

> I'm not a windows guy. I've just noticed that one of your directories
> starts 'C:\Users\..'. Doesn't windows do something crazy with 'user'
> folders? Can you move your docroot outside of this and see if it makes
> any difference?

If I replace this

<Files "*.rbx">
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
</Files>

with this

<Files "*">
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
</Files>

then I again get

 Attempt to serve directory:
C:/Ruby-1.8.6-oniguruma/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/doc/

I find this indeed quite intriguing. Same error as with my very
initial configuration.

Best
Zeno

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Zeno Davatz <zd...@gmail.com>.
Dear Tom

On Wed, Feb 9, 2011 at 6:01 PM, Tom Evans <te...@googlemail.com> wrote:

> I'm not a windows guy. I've just noticed that one of your directories
> starts 'C:\Users\..'. Doesn't windows do something crazy with 'user'
> folders? Can you move your docroot outside of this and see if it makes
> any difference?

;) - me neither. Ok, I will try that. How do you come to that
conclusion, any links or documentation?

Best
Zeno

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Zeno Davatz <zd...@gmail.com>.
Dear Tom

On Wed, Feb 9, 2011 at 6:01 PM, Tom Evans <te...@googlemail.com> wrote:

> I'm not a windows guy. I've just noticed that one of your directories
> starts 'C:\Users\..'. Doesn't windows do something crazy with 'user'
> folders? Can you move your docroot outside of this and see if it makes
> any difference?

I get the same results when I exchange the User Path with this path

C:\Ruby-1.8.6-oniguruma\lib\ruby\gems\1.8\gems\de.oddb-2.0.0\doc

index.rbx shows but only as plain text.

That is why I linked to the bug in the first place, because William
mentioned this:

https://issues.apache.org/bugzilla/show_bug.cgi?id=25435#c7

I still think this is a dev-issue.

Best
Zeno

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Tom Evans <te...@googlemail.com>.
On Wed, Feb 9, 2011 at 4:54 PM, Zeno Davatz <zd...@gmail.com> wrote:
> Dear Tom
>
> Thanks for the reply.
>

I'm not a windows guy. I've just noticed that one of your directories
starts 'C:\Users\..'. Doesn't windows do something crazy with 'user'
folders? Can you move your docroot outside of this and see if it makes
any difference?

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Zeno Davatz <zd...@gmail.com>.
Dear Tom

Thanks for the reply.

On Wed, Feb 9, 2011 at 5:22 PM, Tom Evans <te...@googlemail.com> wrote:

>> This is my mod_ruby.conf settings on Linux and there it just works fine:
>>
>> LoadModule ruby_module modules/mod_ruby.so
>>
>> # taken from the example file
>> # If the ruby module is installed, this will be enabled.
>> # for Apache::RubyRun
>> RubyRequire apache/ruby-run
>>
>> # exec files under /ruby as ruby scripts.
>> <Location /ruby>
>>    SetHandler ruby-object
>>    RubyHandler Apache::RubyRun.instance
>>    Options ExecCGI
>> </Location>
>>
>> # exec *.rbx as ruby scripts.
>> <Files *.rbx>
>>    SetHandler ruby-object
>>    RubyHandler Apache::RubyRun.instance
>> </Files>
>>
>> So if you mean this "Options ExecCGI" then yes, to my understanding
>> Ruby is executed as CGI on Apache, at least on Linux it is.
>
> OK. That config is WAAAAAY different to your posted windows config. In
> your windows config, you have "SetHandler ruby-object" at the vhost
> level, on linux you do not. It's a big difference!

This is my vhosts Linux config: https://gist.github.com/818788

> According to [1], ExecCGI is only required for eruby.

Well it is in our Linux mod_ruby Config as well and we do not use Eruby.

>> Now Apache on Windows delivers me the same result (as so is the following)
>>
>> [error] [client 127.0.0.1] Attempt to serve directory:
>> C:/Users/zdavatz/de.oddb.org/doc/
>>
>> with these settings here: https://gist.github.com/818654
>>
>> This option here https://gist.github.com/818519 I just tried to see if
>> I get the same result or not.

> OK, replace your vhost conf file with this one[2]. Does that work?

Thanks for the file. This just displays me the content of my index.rbx
as plain text but ruby is not actually executed. The access log tells
me:

"GET / HTTP/1.1" 304 -

Best
Zeno

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Tom Evans <te...@googlemail.com>.
On Wed, Feb 9, 2011 at 4:07 PM, Zeno Davatz <zd...@gmail.com> wrote:
> Dear Tom
>
> On Wed, Feb 9, 2011 at 4:12 PM, Tom Evans <te...@googlemail.com> wrote:
>
>> (why are we talking on dev@ btw, this seems clearly a users@
>> discussion. If/when you reply, please drop dev@)
>
> It seems a dev issue because what works on Linux does not seem to work
> on Apache for Windows. That is why I sent this to dev@ as well.

Hmm. Please don't - this isn't a dev issue. See below - you aren't
running the same configuration on windows as on linux. Stop harassing
our poor devs :)

>
>> OK, there are some inconsistencies in your conf.
>>
>> First, in your vhost configuration, you have SetHandler ruby-object at
>> the top level. This *will* set the handler for all requests to the
>> vhost to use handler ruby-object. All requests. Including for files,
>> directory indexes, and so on...
>>
>> Secondly, in the directory where I expect you probably do want to have
>> ruby-object as the handler, you tell apache to execute *.rbx as
>> cgi-script. I thought this whole exercise was to have them executed by
>> mod_ruby..
>>
>> Finally, having found that bug report, you seem to be trying hard to
>> trigger it! In the bug report you linked to us, there is a good
>> work-around listed by wrowe@ - why not use that?
>
> This is my mod_ruby.conf settings on Linux and there it just works fine:
>
> LoadModule ruby_module modules/mod_ruby.so
>
> # taken from the example file
> # If the ruby module is installed, this will be enabled.
> # for Apache::RubyRun
> RubyRequire apache/ruby-run
>
> # exec files under /ruby as ruby scripts.
> <Location /ruby>
>    SetHandler ruby-object
>    RubyHandler Apache::RubyRun.instance
>    Options ExecCGI
> </Location>
>
> # exec *.rbx as ruby scripts.
> <Files *.rbx>
>    SetHandler ruby-object
>    RubyHandler Apache::RubyRun.instance
> </Files>
>
> So if you mean this "Options ExecCGI" then yes, to my understanding
> Ruby is executed as CGI on Apache, at least on Linux it is.

OK. That config is WAAAAAY different to your posted windows config. In
your windows config, you have "SetHandler ruby-object" at the vhost
level, on linux you do not. It's a big difference!

According to [1], ExecCGI is only required for eruby.

>
> Now Apache on Windows delivers me the same result (as so is the following)
>
> [error] [client 127.0.0.1] Attempt to serve directory:
> C:/Users/zdavatz/de.oddb.org/doc/
>
> with these settings here: https://gist.github.com/818654
>
> This option here https://gist.github.com/818519 I just tried to see if
> I get the same result or not.
>
> Best
> Zeno
>

OK, replace your vhost conf file with this one[2]. Does that work?

Cheers

Tom

[1] http://modruby.net/en/doc/?InstallGuide
[2] http://pastebin.com/X79K6V8U

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Zeno Davatz <zd...@gmail.com>.
Dear Tom

On Wed, Feb 9, 2011 at 4:12 PM, Tom Evans <te...@googlemail.com> wrote:

> (why are we talking on dev@ btw, this seems clearly a users@
> discussion. If/when you reply, please drop dev@)

It seems a dev issue because what works on Linux does not seem to work
on Apache for Windows. That is why I sent this to dev@ as well.

> OK, there are some inconsistencies in your conf.
>
> First, in your vhost configuration, you have SetHandler ruby-object at
> the top level. This *will* set the handler for all requests to the
> vhost to use handler ruby-object. All requests. Including for files,
> directory indexes, and so on...
>
> Secondly, in the directory where I expect you probably do want to have
> ruby-object as the handler, you tell apache to execute *.rbx as
> cgi-script. I thought this whole exercise was to have them executed by
> mod_ruby..
>
> Finally, having found that bug report, you seem to be trying hard to
> trigger it! In the bug report you linked to us, there is a good
> work-around listed by wrowe@ - why not use that?

This is my mod_ruby.conf settings on Linux and there it just works fine:

LoadModule ruby_module modules/mod_ruby.so

# taken from the example file
# If the ruby module is installed, this will be enabled.
# for Apache::RubyRun
RubyRequire apache/ruby-run

# exec files under /ruby as ruby scripts.
<Location /ruby>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    Options ExecCGI
</Location>

# exec *.rbx as ruby scripts.
<Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
</Files>

So if you mean this "Options ExecCGI" then yes, to my understanding
Ruby is executed as CGI on Apache, at least on Linux it is.

Now Apache on Windows delivers me the same result (as so is the following)

[error] [client 127.0.0.1] Attempt to serve directory:
C:/Users/zdavatz/de.oddb.org/doc/

with these settings here: https://gist.github.com/818654

This option here https://gist.github.com/818519 I just tried to see if
I get the same result or not.

Best
Zeno

[users@httpd] Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Zeno Davatz <zd...@gmail.com>.
Dear Tom

On Wed, Feb 9, 2011 at 4:12 PM, Tom Evans <te...@googlemail.com> wrote:

> (why are we talking on dev@ btw, this seems clearly a users@
> discussion. If/when you reply, please drop dev@)

It seems a dev issue because what works on Linux does not seem to work
on Apache for Windows. That is why I sent this to dev@ as well.

> OK, there are some inconsistencies in your conf.
>
> First, in your vhost configuration, you have SetHandler ruby-object at
> the top level. This *will* set the handler for all requests to the
> vhost to use handler ruby-object. All requests. Including for files,
> directory indexes, and so on...
>
> Secondly, in the directory where I expect you probably do want to have
> ruby-object as the handler, you tell apache to execute *.rbx as
> cgi-script. I thought this whole exercise was to have them executed by
> mod_ruby..
>
> Finally, having found that bug report, you seem to be trying hard to
> trigger it! In the bug report you linked to us, there is a good
> work-around listed by wrowe@ - why not use that?

This is my mod_ruby.conf settings on Linux and there it just works fine:

LoadModule ruby_module modules/mod_ruby.so

# taken from the example file
# If the ruby module is installed, this will be enabled.
# for Apache::RubyRun
RubyRequire apache/ruby-run

# exec files under /ruby as ruby scripts.
<Location /ruby>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    Options ExecCGI
</Location>

# exec *.rbx as ruby scripts.
<Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
</Files>

So if you mean this "Options ExecCGI" then yes, to my understanding
Ruby is executed as CGI on Apache, at least on Linux it is.

Now Apache on Windows delivers me the same result (as so is the following)

[error] [client 127.0.0.1] Attempt to serve directory:
C:/Users/zdavatz/de.oddb.org/doc/

with these settings here: https://gist.github.com/818654

This option here https://gist.github.com/818519 I just tried to see if
I get the same result or not.

Best
Zeno

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: SetHandler mod_ruby Apache 2.2.17 Windows

Posted by Zeno Davatz <zd...@gmail.com>.
Dear Tom

On Wed, Feb 9, 2011 at 4:12 PM, Tom Evans <te...@googlemail.com> wrote:

> (why are we talking on dev@ btw, this seems clearly a users@
> discussion. If/when you reply, please drop dev@)
>
> OK, there are some inconsistencies in your conf.
>
> First, in your vhost configuration, you have SetHandler ruby-object at
> the top level. This *will* set the handler for all requests to the
> vhost to use handler ruby-object. All requests. Including for files,
> directory indexes, and so on...

What do you mean by top level?

Sorry, I do not understand what you are trying to say. I also tried
this vhosts.conf setting with the same result. As said this setting
works on Linux (without the

<Files "*">
                SetHandler ruby-object
        </Files>.

https://gist.github.com/818654

> Secondly, in the directory where I expect you probably do want to have
> ruby-object as the handler, you tell apache to execute *.rbx as
> cgi-script. I thought this whole exercise was to have them executed by
> mod_ruby..

So where you that be in your opinion? Can you be a bit more specific please.

> Finally, having found that bug report, you seem to be trying hard to
> trigger it! In the bug report you linked to us, there is a good
> work-around listed by wrowe@ - why not use that?

I just sent a Mail to users@

That solution does not seem to work, see this: https://gist.github.com/818654

Best
Zeno