On Thu, Dec 17, 2009 at 2:22 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:
> Hello!
> You have no root defined for location /wiki/. You use alias
> instead, but alias a) isn't inherited into nested location you use
> to handle .php files and b) doesn't affect $document_root variable
> anyway. So
>
> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
>
> uses default root while resolving $document_root, which isn't likely
> what you want.
>
> Try this instead:
>
> location /wiki/ {
> alias /usr/local/www/dokuwiki/;
> index doku.php;
>
> location ~ ^/wiki(.*\.php)$ {
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_param SCRIPT_FILENAME /usr/local/www/dokuwiki$1;
> include fastcgi_params;
>
> }
> }
>
> Maxim Dounin
We worked it out into a configuration very similar but not with the
sublocation (I considered that a mistake, though I know they work we
just aren't "officially" supporting them yet, right?). Below I have
pasted the last known config.
server {
listen 443;
ssl on;
ssl_certificate /usr/local/www/ssl/server.crt;
ssl_certificate_key /usr/local/www/ssl/server.key;
root /usr/local/www;
server_name secure.domain.org;
error_log /var/log/nginx-error.log info;
keepalive_timeout 65;
location / {
root /usr/local/www/data;
index index.htm;
}
location /wiki {
alias /usr/local/www/dokuwiki;
index doku.php;
}
location ~ ^/wiki(/.*\.php)$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/local/www/dokuwiki$1;
fastcgi_pass localphp;
}
location ~ \.php$ {
include fastcgi.conf;
fastcgi_pass localphp;
}
}
-- Merlin
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx