> On Tue, Nov 2, 2010 at 1:41 AM, Chris Rebert <[email protected]> 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 <[email protected]> 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
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to