Welcome! Log In Create A New Profile

Advanced

Re: why my php file in subdirectory doesn't work?

January 06, 2012 06:39AM
I've already tried meny variations including this one. In fact I'm using it right now with some modifications:

location / {
root $sroot;
index index.php index.html index.htm;
if (-e $request_filename) {
break;
}
rewrite ^/(.+)$ /index.php?q=$1 last;
}
if ($host !~* ^www\.) {
rewrite ^(.*)$ http://www.$host$1 permanent;
}

location = /administrator {
rewrite ^ $uri/?$args permanent;
}

location ~ \.php$ {
root $sroot;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /usr/local/etc/nginx/fastcgi_params;
}

location ~ /\.ht {
deny all;
}

But it keeps redirecting me to document_root instead of document_root/subdirectory

Also I know that It worked before some one put his hands on my config files.

hobson42 Wrote:
-------------------------------------------------------
> On 06/01/2012 07:37, gigabyte wrote:
> > fastcgi_param SCRIPT_FILENAME
> $sroot/$fastcgi_script_name ;
> I suspect this should be
>
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
>
>
> Regards
>
> Ian
>
> --
> Ian Hobson
> 31 Sheerwater, Northampton NN3 5HU,
> Tel: 01604 513875
> Preparing eBooks for Kindle and ePub to give the
> best reader experience.
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

why my php file in subdirectory doesn't work?

baalchina September 27, 2011 10:56PM

Re: why my php file in subdirectory doesn't work?

Simon Liu September 27, 2011 11:04PM

Re: why my php file in subdirectory doesn't work?

suttles October 11, 2011 10:53AM

Re: why my php file in subdirectory doesn't work?

Simon Liu October 11, 2011 11:18AM

Re: why my php file in subdirectory doesn't work?

suttles October 11, 2011 11:21AM

Re: why my php file in subdirectory doesn't work?

Simon Liu October 11, 2011 11:42PM

Re: why my php file in subdirectory doesn't work?

suttles October 12, 2011 02:19PM

Re: why my php file in subdirectory doesn't work?

suttles October 17, 2011 12:19PM

Re: why my php file in subdirectory doesn't work?

gigabyte January 06, 2012 02:37AM

Re: why my php file in subdirectory doesn't work?

hobson42 January 06, 2012 05:32AM

Re: why my php file in subdirectory doesn't work?

gigabyte January 06, 2012 06:39AM

Re: why my php file in subdirectory doesn't work?

Edho Arief January 06, 2012 06:42AM

Re: why my php file in subdirectory doesn't work?

gigabyte January 06, 2012 07:26AM

Re: why my php file in subdirectory doesn't work?

Edho Arief January 06, 2012 07:50AM

Re: why my php file in subdirectory doesn't work?

gigabyte January 06, 2012 08:46AM

Re: why my php file in subdirectory doesn't work?

Edho Arief January 06, 2012 08:50AM

Re: why my php file in subdirectory doesn't work?

gigabyte January 06, 2012 09:01AM

Re: why my php file in subdirectory doesn't work?

Edho Arief January 06, 2012 09:08AM

Re: why my php file in subdirectory doesn't work?

gigabyte January 06, 2012 09:23AM

Re: why my php file in subdirectory doesn't work?

Edho Arief January 06, 2012 05:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
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