Welcome! Log In Create A New Profile

Advanced

Nginx 1.7.0: location @php

May 25, 2014 05:49AM
Hi all,

I'm trying to understand why the use of this configuration code does not work:
location ^~ /setup {
auth_basic "Restricted Access";
auth_basic_user_file htpasswd;
try_files $uri $uri/ /setup/index.php?$uri&$args;
location ~ \.php$ {
try_files @php =404;
}
}
location @php {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass fastcgi;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
include fastcgi.conf;
}

This works:
location ^~ /setup {
auth_basic "Restricted Access";
auth_basic_user_file htpasswd;
try_files $uri $uri/ /setup/index.php?$uri&$args;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass fastcgi;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
include fastcgi.conf;
}
}

Thank you for your help.
Subject Author Posted

Nginx 1.7.0: location @php

TECK May 25, 2014 05:49AM

Re: Nginx 1.7.0: location @php

Francis Daly May 25, 2014 09:30AM

Re: Nginx 1.7.0: location @php

TECK May 31, 2014 01:59AM

Re: Nginx 1.7.0: location @php

Francis Daly May 31, 2014 06:00AM

Re: Nginx 1.7.0: location @php

TECK May 31, 2014 06:31AM

Re: Nginx 1.7.0: location @php

Francis Daly May 31, 2014 07:28AM

Re: Nginx 1.7.0: location @php

TECK June 01, 2014 11:47PM

Re[2]: Nginx 1.7.0: location @php

artem June 02, 2014 02:26AM

Re: Nginx 1.7.0: location @php

support June 02, 2014 02:32AM

Re: Nginx 1.7.0: location @php

TECK June 04, 2014 11:36PM

Re: Nginx 1.7.0: location @php

Jonathan Matthews June 02, 2014 07:52AM

Re: Nginx 1.7.0: location @php

TECK June 04, 2014 11:41PM

Re: Nginx 1.7.0: location @php

Reinis Rozitis June 05, 2014 04:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 122
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready