

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
11 messages in ru.sysoev.nginxRe: drupal try_files php fastcgi| From | Sent On | Attachments |
|---|---|---|
| Otto Bretz | Mar 14, 2009 3:13 am | |
| Igor Sysoev | Mar 14, 2009 8:44 am | |
| Otto Bretz | Mar 16, 2009 2:03 am | |
| Igor Sysoev | Mar 16, 2009 3:33 am | |
| mike | Mar 16, 2009 9:26 am | |
| Cliff Wells | Mar 16, 2009 9:51 am | |
| Igor Sysoev | Mar 16, 2009 10:12 am | |
| Igor Sysoev | Mar 16, 2009 10:15 am | |
| Cliff Wells | Mar 16, 2009 10:21 am | |
| Mark Alan | Mar 16, 2009 1:42 pm | |
| Leon Kellermann | Mar 16, 2009 8:24 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: drupal try_files php fastcgi | Actions... |
|---|---|---|
| From: | Igor Sysoev (is...@rambler-co.ru) | |
| Date: | Mar 16, 2009 10:12:20 am | |
| List: | ru.sysoev.nginx | |
On Mon, Mar 16, 2009 at 09:51:55AM -0700, Cliff Wells wrote:
http://wiki.nginx.org/NginxJoomla
I find that basic recipe works for a lot of PHP frameworks.
Does Joomla require "/index.php?q=$request_uri" ? When I have checked on their site, just /index.php was enough.
It's better to use try_files:
root /path/to/root;
location / { try_files $uri $uri/ @fallback; }
location ~ \.php$ { try_files $uri @fallback;
fastcgi_pass ...;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # or just # fastcgi_param SCRIPT_FILENAME $document_root$uri; # as here $fastcgi_script_name == $uri fastcgi_param QUERY_STRING $query_string;
# other fastcgi_param's }
location @fallback { fastcgi_pass ...;
fastcgi_param SCRIPT_FILENAME $document_root/index.php; fastcgi_param QUERY_STRING q=$request_uri;
# other fastcgi_param's }
Probably, you can use omit @fallback:
location / { try_files $uri $uri/ /index.php?q=$request_uri; }
location ~ \.php$ { try_files $uri /index.php?q=$request_uri; ... }
On Mon, 2009-03-16 at 09:26 -0700, mike wrote:
2009/3/16 Igor Sysoev <is...@rambler-co.ru>:
Have you @drupal location ?
This is one thing I want to get up on the wiki cookbook, a simple
@wordpress @drupal
etc.
Simple being the key word.
A lot of people do wordpress crap with wp-content/*.js and all these other filters and all you need is a simple
if (!-e $request_filename) {} or try_files $uri $uri/ @wordpress or try_files $uri $uri/ /path/to/main/wordpress/index.php
etc.
right now i run my blog using this:
error_page 404 = /wordpress/index.php?q=$request_uri;
works like a charm. i do want to start using try_files as I assume that is more efficient and not kind of a silly hack "hey, if it's a 404, use -this- as the page handler!"
-- Igor Sysoev http://sysoev.ru/en/







