Newbie config not working..
merlin corey
merlincorey at dc949.org
Fri Dec 18 01:27:45 MSK 2009
On Thu, Dec 17, 2009 at 2:22 PM, Maxim Dounin <mdounin at 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
More information about the nginx
mailing list