Yanik Proulx | 1 Nov 2010 19:45
Picon
Gravatar

Question about authentication

I know there are explanations and examples of how to setup
authentication in the online documentation, but I just can't get it to
work the way I want.

I'm running Django + Cherokee. I would like to password protect the
entire site, except for one folder (/api). I can't figure out what
rule to write in which order.
Alvaro Lopez Ortega | 1 Nov 2010 19:57
Favicon
Gravatar

Re: Question about authentication

On 01/11/2010, at 19:45, Yanik Proulx wrote:

> I know there are explanations and examples of how to setup
> authentication in the online documentation, but I just can't get it to
> work the way I want.
> 
> I'm running Django + Cherokee. I would like to password protect the
> entire site, except for one folder (/api). I can't figure out what
> rule to write in which order.

The rule's match would be 'NOT (Directory /api)'. It should be placed as the first of the list, market as
Non-Final. In that way, every single request (but the ones targeting the /api directory) will apply your
authentication settings.

--
Octality
http://www.octality.com/
Chris Rebert | 2 Nov 2010 06:41
Favicon

unknown MediaWiki breakage

So, I updated Cherokee a while ago and apparently that broke my
MediaWiki setup somehow. I've tried scrapping the config and
re-running the MediaWiki vServer wizard from scratch, to no avail
(When it was previously working, MediaWiki had been setup via the
wizard). It had been running fine on my root domain name, but now when
I try and access it from plain http://rebertia.com , I get a 403
Forbidden. When I access a wiki URL specifically (e.g.
http://rebertia.com/wiki/Main_Page ), I get served a raw PHP file. On
the other hand, my Wordpress-powered blog is still working fine even
after restarting Cherokee several times and purging my browser's
cache, so PHP itself seems to be in working order.

I'm a greenhorn as far as running a server, so I'd appreciate any
suggestions whatsoever as to how to fix this.
I'm running Cherokee 1.0.8 on Ubuntu; MediaWiki v1.16.0

In the unlikely event that it helps, here's what I believe to be the
relevant parts of cherokee.conf (although they should just be the
wizard-generated defaults):
vserver!10!directory_index = index.html
vserver!10!document_root = /var/www
vserver!10!error_writer!filename = /var/log/cherokee/cherokee.error
vserver!10!error_writer!type = file
vserver!10!logger = combined
vserver!10!logger!access!buffsize = 16384
vserver!10!logger!access!filename = /var/log/cherokee/cherokee.access
vserver!10!logger!access!type = file
vserver!10!nick = default
vserver!10!rule!5!encoder!gzip = allow
vserver!10!rule!5!handler = server_info
(Continue reading)

Jeff Johnson | 2 Nov 2010 10:38
Picon

Re: unknown MediaWiki breakage

Hi Chris,
   A quick look over your config identifies a couple of things you might want to check.  First, in cherokee-admin, go to the vServer for your MediaWiki install-->Behaviors-->Rule Management. Take a look at the very last rule in the list, "Default". When I tried to get MediaWiki running on my local machine, it wouldn't work without appending  /index.php (even though it was set as the index)  unless I changed the default rule from "Static Content" to "List and Send". Didn't really take the time to see why just yet, but it does seem to behave that way.

Second, I don't think PHP is configured properly on that particular Virtual Server. Take a look at the Extensions .php handler in that Virtual Server. The configuration should match the PHP config in the working Virtual Server that your working web site is running on (assuming they're in the same instance of Cherokee). Make sure there's an information source assigned toward the bottom of that handler's configuration page. PHP is misconfigured in that Virtual Server (somehow). That is causing PHP to fail only on that one virtual server while the other one is working.

Lastly, let me apologize if this e-mail doesn't make sense. I've been awake for about 20 hours and about to head off to catch some sleep. :) I just wanted to see if I could offer some assistance before I took off.

Jeff



On Tue, Nov 2, 2010 at 1:41 AM, Chris Rebert <cherokee <at> rebertia.com> wrote:
So, I updated Cherokee a while ago and apparently that broke my
MediaWiki setup somehow. I've tried scrapping the config and
re-running the MediaWiki vServer wizard from scratch, to no avail
(When it was previously working, MediaWiki had been setup via the
wizard). It had been running fine on my root domain name, but now when
I try and access it from plain http://rebertia.com , I get a 403
Forbidden. When I access a wiki URL specifically (e.g.
http://rebertia.com/wiki/Main_Page ), I get served a raw PHP file. On
the other hand, my Wordpress-powered blog is still working fine even
after restarting Cherokee several times and purging my browser's
cache, so PHP itself seems to be in working order.

I'm a greenhorn as far as running a server, so I'd appreciate any
suggestions whatsoever as to how to fix this.
I'm running Cherokee 1.0.8 on Ubuntu; MediaWiki v1.16.0

In the unlikely event that it helps, here's what I believe to be the
relevant parts of cherokee.conf (although they should just be the
wizard-generated defaults):
vserver!10!directory_index = index.html
vserver!10!document_root = /var/www
vserver!10!error_writer!filename = /var/log/cherokee/cherokee.error
vserver!10!error_writer!type = file
vserver!10!logger = combined
vserver!10!logger!access!buffsize = 16384
vserver!10!logger!access!filename = /var/log/cherokee/cherokee.access
vserver!10!logger!access!type = file
vserver!10!nick = default
vserver!10!rule!5!encoder!gzip = allow
vserver!10!rule!5!handler = server_info
vserver!10!rule!5!handler!type = just_about
vserver!10!rule!5!match = directory
vserver!10!rule!5!match!directory = /about
vserver!10!rule!4!document_root = /usr/lib/cgi-bin
vserver!10!rule!4!handler = cgi
vserver!10!rule!4!match = directory
vserver!10!rule!4!match!directory = /cgi-bin
vserver!10!rule!3!document_root = /usr/share/cherokee/themes
vserver!10!rule!3!handler = file
vserver!10!rule!3!match = directory
vserver!10!rule!3!match!directory = /cherokee_themes
vserver!10!rule!2!document_root = /usr/share/cherokee/icons
vserver!10!rule!2!handler = file
vserver!10!rule!2!match = directory
vserver!10!rule!2!match!directory = /icons
vserver!10!rule!1!handler = common
vserver!10!rule!1!handler!iocache = 1
vserver!10!rule!1!match = default
vserver!30!directory_index = index.php,index.html
vserver!30!document_root = /usr/share/mediawiki
vserver!30!error_writer!filename = /var/log/cherokee/cherokee.error
vserver!30!error_writer!type = file
vserver!30!logger = combined
vserver!30!logger!access!buffsize = 16384
vserver!30!logger!access!filename = /var/log/cherokee/cherokee.access
vserver!30!logger!access!type = file
vserver!30!nick = rebertia.com
vserver!30!rule!60!document_root = /usr/share/mediawiki
vserver!30!rule!60!match = directory
vserver!30!rule!60!match!directory = /w
vserver!30!rule!60!match!final = 0
vserver!30!rule!50!handler = redir
vserver!30!rule!50!handler!rewrite!1!show = 1
vserver!30!rule!50!handler!rewrite!1!substring = /w/index.php
vserver!30!rule!50!match = fullpath
vserver!30!rule!50!match!fullpath!1 = /wiki
vserver!30!rule!50!match!fullpath!2 = /wiki/
vserver!30!rule!40!handler = redir
vserver!30!rule!40!handler!rewrite!1!show = 0
vserver!30!rule!40!handler!rewrite!1!substring = /w/index.php?/$1
vserver!30!rule!40!match = request
vserver!30!rule!40!match!request = /wiki/(.+)
vserver!30!rule!30!encoder!gzip = 1
vserver!30!rule!30!handler = fcgi
vserver!30!rule!30!handler!balancer = round_robin
vserver!30!rule!30!handler!balancer!source!1 = 1
vserver!30!rule!30!handler!error_handler = 1
vserver!30!rule!30!match = extensions
vserver!30!rule!30!match!check_local_file = 1
vserver!30!rule!30!match!extensions = php
vserver!30!rule!30!match!final = 0
vserver!30!rule!30!timeout = 30
vserver!30!rule!20!encoder!deflate = 0
vserver!30!rule!20!encoder!gzip = 0
vserver!30!rule!20!expiration = time
vserver!30!rule!20!expiration!time = 1h
vserver!30!rule!20!handler = file
vserver!30!rule!20!handler!iocache = 1
vserver!30!rule!20!match = fullpath
vserver!30!rule!20!match!fullpath!1 = /favicon.ico
vserver!30!rule!20!match!fullpath!2 = /robots.txt
vserver!30!rule!20!match!fullpath!3 = /crossdomain.xml
vserver!30!rule!10!handler = file
vserver!30!rule!10!match = default

Cheers and Thanks,
Chris
_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee

_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee
Chris Rebert | 2 Nov 2010 11:20
Favicon

Re: unknown MediaWiki breakage

> On Tue, Nov 2, 2010 at 1:41 AM, Chris Rebert <cherokee <at> rebertia.com> wrote:
>> So, I updated Cherokee a while ago and apparently that broke my
>> MediaWiki setup somehow. I've tried scrapping the config and
>> re-running the MediaWiki vServer wizard from scratch, to no avail
>> (When it was previously working, MediaWiki had been setup via the
>> wizard). It had been running fine on my root domain name, but now when
>> I try and access it from plain http://rebertia.com , I get a 403
>> Forbidden. When I access a wiki URL specifically (e.g.
>> http://rebertia.com/wiki/Main_Page ), I get served a raw PHP file. On
>> the other hand, my Wordpress-powered blog is still working fine even
>> after restarting Cherokee several times and purging my browser's
>> cache, so PHP itself seems to be in working order.
>>
>> I'm a greenhorn as far as running a server, so I'd appreciate any
>> suggestions whatsoever as to how to fix this.
>> I'm running Cherokee 1.0.8 on Ubuntu; MediaWiki v1.16.0

On Tue, Nov 2, 2010 at 2:38 AM, Jeff Johnson <jeffcj <at> gmail.com> wrote:
> Hi Chris,
>    A quick look over your config identifies a couple of things you might
> want to check.  First, in cherokee-admin, go to the vServer for your
> MediaWiki install-->Behaviors-->Rule Management. Take a look at the very
> last rule in the list, "Default". When I tried to get MediaWiki running on
> my local machine, it wouldn't work without appending  /index.php (even
> though it was set as the index)  unless I changed the default rule from
> "Static Content" to "List and Send". Didn't really take the time to see why
> just yet, but it does seem to behave that way.

That does indeed fix the 403 Forbidden. Thanks! (Although I agree it'd
be nice to know why this change is necessary.)

> Second, I don't think PHP is configured properly on that particular Virtual
> Server. Take a look at the Extensions .php handler in that Virtual Server.
> The configuration should match the PHP config in the working Virtual Server
> that your working web site is running on (assuming they're in the same
> instance of Cherokee). Make sure there's an information source assigned
> toward the bottom of that handler's configuration page. PHP is misconfigured
> in that Virtual Server (somehow). That is causing PHP to fail only on that
> one virtual server while the other one is working.

Unfortunately, the configurations (both GUI and config file) seemed to
already match AFAICT. Though I no longer get the 403, the server is
still serving raw PHP. So, one issue down, one larger one still to go.
In case it helps, here are the PHP, WordPress, and MediaWiki portions
of my cherokee.conf:

PHP Source config:
source!1!env!PHP_FCGI_CHILDREN = 5
source!1!env!PHP_FCGI_MAX_REQUESTS = 490
source!1!host = 127.0.0.1:47990
source!1!interpreter = /usr/bin/php-cgi -b 127.0.0.1:47990
source!1!nick = PHP Interpreter
source!1!type = interpreter

Working WordPress config:
vserver!20!directory_index = index.php,index.html
vserver!20!document_root = /usr/share/wordpress
<< error and log settings omitted for space/relevance >>
vserver!20!nick = blog.rebertia.com
vserver!20!rule!50!encoder!gzip = 1
vserver!20!rule!50!handler = fcgi
vserver!20!rule!50!handler!balancer = round_robin
vserver!20!rule!50!handler!balancer!source!1 = 1
vserver!20!rule!50!handler!error_handler = 1
vserver!20!rule!50!match = extensions
vserver!20!rule!50!match!check_local_file = 1
vserver!20!rule!50!match!extensions = php
vserver!20!rule!50!match!final = 0
vserver!20!rule!50!timeout = 30
<< /favicon.ico, /robots.txt, /crossdomain.xml rule omitted for
space/relevance >>
vserver!20!rule!30!handler = redir
vserver!20!rule!30!handler!rewrite!1!regex = (.*)/
vserver!20!rule!30!handler!rewrite!1!show = 0
vserver!20!rule!30!handler!rewrite!1!substring = $1/index.php
vserver!20!rule!30!match = fullpath
vserver!20!rule!30!match!fullpath!1 = /
vserver!20!rule!30!match!fullpath!2 = /wp-admin/
vserver!20!rule!20!disabled = 0
vserver!20!rule!20!handler = file
vserver!20!rule!20!handler!iocache = 1
vserver!20!rule!20!match = exists
vserver!20!rule!20!match!iocache = 1
vserver!20!rule!20!match!match_any = 1
vserver!20!rule!20!match!match_only_files = 1
vserver!20!rule!10!handler = redir
vserver!20!rule!10!handler!rewrite!1!regex = /(.+)
vserver!20!rule!10!handler!rewrite!1!show = 0
vserver!20!rule!10!handler!rewrite!1!substring = /index.php?/$1
vserver!20!rule!10!match = default

Broken MediaWiki config:
vserver!50!directory_index = index.php,index.html
vserver!50!document_root = /usr/share/mediawiki
<< error and log settings omitted for space/relevance >>
vserver!50!nick = rebertia.com
vserver!50!rule!60!document_root = /usr/share/mediawiki
vserver!50!rule!60!match = directory
vserver!50!rule!60!match!directory = /w
vserver!50!rule!60!match!final = 0
vserver!50!rule!50!handler = redir
vserver!50!rule!50!handler!rewrite!1!show = 1
vserver!50!rule!50!handler!rewrite!1!substring = /w/index.php
vserver!50!rule!50!match = fullpath
vserver!50!rule!50!match!fullpath!1 = /wiki
vserver!50!rule!50!match!fullpath!2 = /wiki/
vserver!50!rule!40!handler = redir
vserver!50!rule!40!handler!rewrite!1!show = 0
vserver!50!rule!40!handler!rewrite!1!substring = /w/index.php?/$1
vserver!50!rule!40!match = request
vserver!50!rule!40!match!request = /wiki/(.+)
vserver!50!rule!30!encoder!gzip = 1
vserver!50!rule!30!handler = fcgi
vserver!50!rule!30!handler!balancer = round_robin
vserver!50!rule!30!handler!balancer!source!1 = 1
vserver!50!rule!30!handler!error_handler = 1
vserver!50!rule!30!match = extensions
vserver!50!rule!30!match!check_local_file = 1
vserver!50!rule!30!match!extensions = php
vserver!50!rule!30!match!final = 0
vserver!50!rule!30!timeout = 30
<< /favicon.ico, /robots.txt, /crossdomain.xml rule omitted for
space/relevance >>
vserver!50!rule!10!handler = common
vserver!50!rule!10!match = default

> Lastly, let me apologize if this e-mail doesn't make sense. I've been awake
> for about 20 hours and about to head off to catch some sleep. :) I just
> wanted to see if I could offer some assistance before I took off.

I very much appreciate the effort. Good luck with the shuteye. I
should be getting some myself right now. :-)

Thanks,
Chris
_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee
Stefan de Konink | 2 Nov 2010 11:38
Picon
Gravatar

Re: unknown MediaWiki breakage

On Tue, 2 Nov 2010, Chris Rebert wrote:

> That does indeed fix the 403 Forbidden. Thanks! (Although I agree it'd
> be nice to know why this change is necessary.)

Static doesn't give you 'indices'. You could probably do better by adding 
fullpath / or a file exist followed by a regexp /.*

But never setup mediawiki under Cherokee, couldn't comment on it.

Stefan
Alvaro Lopez Ortega | 3 Nov 2010 16:57
Favicon
Gravatar

Heads up: Local Cherokee communities server

Good news everyone!

Thanks to Sandino Networks¹ the different local Cherokee communities now have a server in which host
their content.

The server is already available for the different communities to host their content. Please, if you are
working on any of the communities or you are planning to do so in the near future, let us know the resources
you'll need so they can be allocated for you.

Cheers!

 1.- http://www.sandino.net/

--
Octality
http://www.octality.com/
M. David Peterson | 3 Nov 2010 23:18
Gravatar

Re: Heads up: Local Cherokee communities server



On Wed, Nov 3, 2010 at 9:57 AM, Alvaro Lopez Ortega <alvaro <at> octality.com> wrote:
Good news everyone!

Thanks to Sandino Networks¹ the different local Cherokee communities now have a server in which host their content.

The server is already available for the different communities to host their content. Please, if you are working on any of the communities or you are planning to do so in the near future, let us know the resources you'll need so they can be allocated for you.

Is there a list of existing communities somewhere? I'm interested in creating a community for the Mountain West region of the US if a similar community doesn't already exist.

--
/M:D

M. David Peterson
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: m.david <at> 3rdandUrban.com | m.david <at> amp.fm
Mobile: (206) 999-0588
http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 | http://broadcast.oreilly.com/m-david-peterson/
_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee
Alvaro Lopez Ortega | 4 Nov 2010 07:45
Favicon
Gravatar

Re: Heads up: Local Cherokee communities server

On 03/11/2010, at 23:18, M. David Peterson wrote:

On Wed, Nov 3, 2010 at 9:57 AM, Alvaro Lopez Ortega <alvaro <at> octality.com> wrote:
Good news everyone!

Thanks to Sandino Networks¹ the different local Cherokee communities now have a server in which host their content.

The server is already available for the different communities to host their content. Please, if you are working on any of the communities or you are planning to do so in the near future, let us know the resources you'll need so they can be allocated for you.

Is there a list of existing communities somewhere? I'm interested in creating a community for the Mountain West region of the US if a similar community doesn't already exist.

As far as I'm aware of, the current (incipient) communities are: Poland, China, Hispano (spanish speaking) and Italy. Besides, I know there have been conversations about a German community, but certainly nothing as specific as a region inside the US.


_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee
M. David Peterson | 5 Nov 2010 12:09
Gravatar

Re: Heads up: Local Cherokee communities server

On Thu, Nov 4, 2010 at 12:45 AM, Alvaro Lopez Ortega <alvaro <at> octality.com> wrote:

As far as I'm aware of, the current (incipient) communities are: Poland, China, Hispano (spanish speaking) and Italy. Besides, I know there have been conversations about a German community, but certainly nothing as specific as a region inside the US.

Whoa! The whole U.S. is /wide/ open?  Interesting.  While I have MANY more questions in regards to how other communities have been organized and where they're placing their focus in regards to UG meetups, regional events, etc. the question that I am most curious about at the moment is your thoughts on allocating a sub-domain of cherokee-project.com (e.g. communities.cherokee-project.com or local.cherokee-project.com, etc.) which could be further extended by the two letter country code related to each region at the subdomain level, using the path to dig down into the specific regions that are bound to develop as they have in pretty much every other major tech community space here in the U.S. e.g. Both the Python and Ruby communities have self organized at various regional levels to allow for shorter travel times, a focus on the tech economy relevant to the region the attendees live and work in, etc.  In this regard, using a subdomain.domain.com structure similar to us.communities.cherokee-project.com and allowing for the path structure to evolve based on the self organizational tendencies of each regional community to pretty much just decide to push forward with the creation of a local user group, support community, etc., leaving the root of the path to break things down by user-groups, conferences, IRC-based regional support groups, etc. for "registration" on a first-come, first-served based (e.g. us.communities.cherokee-project.com/conference/mountain-west or us.communities.cherokee-project.com/irc/bay-area, etc.

I realize the above probably seems a bit over the top, but having been a card carrying member of the U.S.-based tech communities for coming up on 27 years now I can attest to the fact that here in the U.S. people like to do things their own way, and appreciate any and all efforts made by the top-level folks in each top-level community to accommodate them in ways that make it easy for them to just pick things up and run with whatever area they decide to focus on in whatever region of the U.S. they decide to place that focus.

In the above regard, if you'd be willing to consider the possibility of allocating a subdomain of cherokee-project.com specific to the purpose at hand, using the two letter country code as a subdomain of whatever that chose might be allow for an easily recognizable tiered domain name structure which allows nicely for spreading the load of each major region of the world across multiple server/server farms donated by the community, then I'd like to follow sandino.net's lead and offer a complete hosting solution, fully powered by cherokee of course, which keeps a consistent theme with the primary site which would be specific to the U.S. market.

Thoughts?

--
/M:D

M. David Peterson
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: m.david <at> 3rdandUrban.com | m.david <at> amp.fm
Mobile: (801) 742-1864
http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 | http://broadcast.oreilly.com/m-david-peterson/
_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee

Gmane