Welcome! Log In Create A New Profile

Advanced

Re: Newbie config not working..

merlin corey
December 17, 2009 05:32PM
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
Subject Author Posted

Newbie config not working..

mystique December 17, 2009 02:44PM

Re: Newbie config not working..

merlin corey December 17, 2009 05:22PM

Re: Newbie config not working..

Maxim Dounin December 17, 2009 05:26PM

Re: Newbie config not working..

merlin corey December 17, 2009 05:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready