-----Original Message----- From: Alvaro Lopez Ortega [mailto:[email protected]] On Behalf Of Alvaro Lopez Ortega Sent: March-03-09 3:28 AM To: Superman Jason Cc: Cherokee User List Subject: Re: [Cherokee] Directory Aliases - to directories with php or likewise.
On 03-mar-09, at 02:42, Superman Jason wrote: > The great thing with this feature is it is easy to point an alias at > a directory anywhere and control the features for it separately. I'm afraid this sort of delegation is not supported yet. > I see that it's easy to add a regular directory to Cherokee, but > how would one go about adding one that points to a directory like > drupal that is mostly php script? The behavior of a virtual server is based on a list of rules. Those rules will be evaluated from highest to lowest priority (top to down in the Behavior list). As you can see, the "Extension PHP" rule is on top of the list. Thus, it will match all the .php requests independently of where the files are located. In the case of Drupal, it'd be almost the same. The only thing you'd have to do is to add a new rules *before* the "Extension PHP" one. It'd only have to specify the Document Root (/usr/local/www/drupal6). It is very important to ensure that this new rule is *not* marked as Final, so once the Document Root has been set, the evaluation continues until it reaches the "Extension PHP" rule. The concept is simple, although I wonder whether I've managed to explain it. -- Greetings, alo http://www.alobbs.com/ -------------------------------------------------------------------- Hi Alvaro, Thanks for your prompt reply! Okay, that's what I had thought about the rules, but it didn't seem to work. I want the Directory to be /drupal with the Document Root /usr/local/www/drupal6. What handler should I use to accomplish that? I have tried it with List & Send, List, and FastCGI if I recall correctly. With the List or List & Send when I access the page it just tries to download & save to disk the index.php file, it doesn't actually execute the php. But with FastCGI it just gives me an 404 error, plus it just doesn't seem like the right way to accomplish this. Can you steer me in the right direction? I'm trying to accomplish it all from the Cherokee-admin Web Interface, but here's the pertinent parts of the configuration file: server!bind!1!port = 81 server!bind!1!tls = 0 server!bind!2!port = 8443 server!bind!2!tls = 1 server!group = www server!ipv6 = 0 server!keepalive = 1 server!keepalive_max_requests = 500 server!panic_action = /usr/local/bin/cherokee-panic server!pid_file = /var/run/cherokee.pid server!server_tokens = full server!timeout = 15 server!tls = libssl server!user = www vserver!40!directory_index = index.php,index.html vserver!40!document_root = /usr/local/www/vhosts/autotriminc.com/ vserver!40!domain!2 = www.autotriminc.com vserver!40!domain!3 = autotriminc.ca vserver!40!domain!4 = www.autotriminc.ca vserver!40!keepalive = 1 vserver!40!logger = combined vserver!40!logger!access!buffsize = 16384 vserver!40!logger!access!filename = /var/log/autotriminc.com_cherokee.access vserver!40!logger!access!type = file vserver!40!logger!error!filename = /var/log/autotriminc.com_cherokee.error vserver!40!logger!error!type = file vserver!40!nick = autotriminc.com vserver!40!rule!700!document_root = /usr/local/www/drupal6 vserver!40!rule!700!encoder!deflate = 0 vserver!40!rule!700!encoder!gzip = 0 vserver!40!rule!700!handler = common vserver!40!rule!700!handler!allow_dirlist = 1 vserver!40!rule!700!handler!allow_pathinfo = 0 vserver!40!rule!700!handler!date = 1 vserver!40!rule!700!handler!group = 0 vserver!40!rule!700!handler!iocache = 1 vserver!40!rule!700!handler!size = 1 vserver!40!rule!700!handler!symlinks = 1 vserver!40!rule!700!handler!theme = default vserver!40!rule!700!handler!user = 0 vserver!40!rule!700!match = directory vserver!40!rule!700!match!directory = /drupal vserver!40!rule!700!match!final = 0 vserver!40!rule!700!only_secure = 0 vserver!40!rule!600!encoder!deflate = 0 vserver!40!rule!600!encoder!gzip = 1 vserver!40!rule!600!handler = fcgi vserver!40!rule!600!handler!balancer = round_robin vserver!40!rule!600!handler!balancer!source!1 = 1 vserver!40!rule!600!handler!change_user = 0 vserver!40!rule!600!handler!check_file = 1 vserver!40!rule!600!handler!error_handler = 0 vserver!40!rule!600!handler!pass_req_headers = 1 vserver!40!rule!600!handler!xsendfile = 0 vserver!40!rule!600!match = extensions vserver!40!rule!600!match!extensions = php vserver!40!rule!600!match!final = 1 vserver!40!rule!600!only_secure = 0 vserver!40!rule!500!encoder!gzip = 1 vserver!40!rule!500!handler = server_info vserver!40!rule!500!handler!type = just_about vserver!40!rule!500!match = directory vserver!40!rule!500!match!directory = /about vserver!40!rule!500!match!final = 1 vserver!40!rule!400!document_root = /usr/local/lib/cgi-bin vserver!40!rule!400!handler = cgi vserver!40!rule!400!match = directory vserver!40!rule!400!match!directory = /cgi-bin vserver!40!rule!400!match!final = 1 vserver!40!rule!300!document_root = /usr/local/share/cherokee/themes vserver!40!rule!300!handler = file vserver!40!rule!300!match = directory vserver!40!rule!300!match!directory = /cherokee_themes vserver!40!rule!300!match!final = 1 vserver!40!rule!200!document_root = /usr/local/share/cherokee/icons vserver!40!rule!200!handler = file vserver!40!rule!200!match = directory vserver!40!rule!200!match!directory = /icons vserver!40!rule!200!match!final = 1 vserver!40!rule!100!handler = common vserver!40!rule!100!handler!iocache = 0 vserver!40!rule!100!match = default vserver!40!rule!100!match!final = 1 vserver!40!ssl_certificate_file = <certificate> vserver!40!ssl_certificate_key_file = <private key> Thanks for the great server, and the help!! Jason _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
