Welcome! Log In Create A New Profile

Advanced

Re: nginx adding index.html to requests

Adie Nurahmadie
October 19, 2014 01:48AM
Your location regex wont accept /var/www_opennote/Service/
service.php/config/index.html
change it to:

location ~ ^(.+\.php)(/.+)$
# the last `$` doesn't really do much in this pattern

And try changing fastcgi_params with fastcgi.conf, since fastcgi_params
doesn't set SCRIPT_FILENAME in it.
also you may want to set PATH_INFO param.

ref:
http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info


On Sun, Oct 19, 2014 at 12:18 PM, killer1337 <nginx-forum@nginx.us> wrote:

> Hi everybody,
> I am trying to set up a web app called opennote on my nginx server but
> somehow it doesn't work. When I call the page the error log shows:
>
> 2014/10/16 13:12:39 [error] 21400#0: *11
> "/var/www_opennote/Service/service.php/config/index.html" is not found (20:
> Not a directory), client: 192.168.217.41, server: , request: "GET
> /Service/service.php/config/ HTTP/1.1", host: "192.168.217.201:444",
> referrer: "https://192.168.217.201:444/"
>
> According to the developer of the app the problem appears to be that ngix
> is
> adding the index.html to Service/service.php/config/
>
> So the application is requesting Service/service.php/config/index.html when
> it should be requesting Service/service.php/config/.
>
> I already tried to add
>
> location / {
> autoindex off;
> }
>
> to my config but it didn't help.
>
> My nginx config is:
>
> server {
> listen 444 ssl;
> ssl_certificate bla.crt;
> ssl_certificate_key bla.key;
> set $root_path "/var/www_opennote";
> root $root_path;
> set $socket
> "unix:/var/run/fpm-00796029-695b-475a-a87c-f2b25af36486.sock";
> location ~ \.php$ {
> fastcgi_split_path_info ^(.+\.php)(/.+)$;
> fastcgi_pass $socket;
> fastcgi_index index.php;
> include fastcgi_params;
> }
> access_log
> /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-access.log;
> error_log
> /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-error.log;
> large_client_header_buffers 4 32k;
> }
>
> You can find my discussion with the developer here:
> https://github.com/FoxUSA/OpenNote/issues/102
>
> Thank you for any hint on how I can solve my issue!
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,254127,254127#msg-254127
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



--
regards,
Nurahmadie
--
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx adding index.html to requests

killer1337 October 19, 2014 01:18AM

Re: nginx adding index.html to requests

Adie Nurahmadie October 19, 2014 01:48AM

Re: nginx adding index.html to requests

Adie Nurahmadie October 19, 2014 02:06AM

Re: nginx adding index.html to requests

killer1337 October 19, 2014 02:27AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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