Welcome! Log In Create A New Profile

Advanced

Re: Newbie config not working..

Maxim Dounin
December 17, 2009 05:26PM
Hello!

On Thu, Dec 17, 2009 at 02:58:41PM -0500, mystique wrote:

[...]

> 66 location /wiki/ {
> 67 alias /usr/local/www/dokuwiki/;
> 68 include php_fastcgi_support;
> 69 index doku.php;
> 70 }

[...]

> php_fastcgi_support:
>
> 1 location ~ \.php$ {
> 2 fastcgi_pass 127.0.0.1:9000;
> 3 fastcgi_index index.php;
> 4 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
> 5 include fastcgi_params;
> 6 }
>
>
> going to http://www.domain.org/ shows the wordpress site like it should and wp-admin and the likes all seem to work (wonderful)
>
> The part that is not working as desired is the ssl portion.
>
> going to https://secure.domain.org works as intended; which is rendering the contents of /usr/local/www/data trying to get to https://secure.domain.org/wiki/(index.php) does not work at all.

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

_______________________________________________
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: 264
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