Welcome! Log In Create A New Profile


migrate fastcgi_split_path_info to uwsgi

A. Schulze
December 23, 2018 08:24AM
cross-posting to horde & nginx lists...


I plan to migrate a PHP Application (horde) from php-fpm to uwsgi.
nginx talk "fastcgi protocol" to php-fpm now and have to talk "uwsgi protocol" to uwsgi later.

Horde uses partially arguments as URL elements.
example comment in https://github.com/horde/base/blob/master/services/ajax.php

the corresponding nginx config I currently use:

location ~ /horde/services/ajax.php/ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php.sock;
include /etc/nginx/fastcgi.conf;

the example URL used in ajax.php: http://example.com/horde/services/ajax.php/APP/ACTION[?OPTIONS]

without fastcgi_split_path_info:
SCRIPT_FILENAME /horde/services/ajax.php/APP/ACTION
PATH_INFO is empty?

with fastcgi_split_path_info:
SCRIPT_FILENAME /horde/services/ajax.php

hope, this is correct so far...
to verify my setup I configured

location /horde/services/ajax.php {
fastcgi_split_path_info ^(/horde/services/ajax\.php)(.+)$;
return 200 "REQUEST_URI: $request_uri, SCRIPT_FILENAME: $fastcgi_script_name, PATH_INFO: $fastcgi_path_info ARGS: $args\n";

$ curl 'https://example.org/horde/services/ajax.php/APP/ACTION?OPTION=foobar'
REQUEST_URI: /horde/services/ajax.php/APP/ACTION?OPTION=foobar, SCRIPT_FILENAME: /horde/services/ajax.php, PATH_INFO: /APP/ACTION ARGS: OPTION=foobar

that _looks_ correct to me.

Anyway, horde don't work, I get 404 back:
[pid: 1301|app: -1|req: -1/10] 2001:db8::2 () {58 vars in 1220 bytes} [Sun Dec 23 14:19:22 2018] POST /horde/services/ajax.php/imp/dynamicInit => generated 9 bytes in 0 msecs (HTTP/2.0 404) 2 headers in 71 bytes (0 switches on core 0)

Unfortunately there is no "uwsgi_split_path_info" in nginx.
That means to me
- it's simply not implemented
- the problem is solved in a other way.

I appreciate any hint on how to solve the "split" or at least debug what's going on.


nginx mailing list
Subject Author Posted

migrate fastcgi_split_path_info to uwsgi

A. Schulze December 23, 2018 08:24AM

Re: migrate fastcgi_split_path_info to uwsgi

Francis Daly December 27, 2018 12:18PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 98
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready