Welcome! Log In Create A New Profile


Re: migrate fastcgi_split_path_info to uwsgi

Francis Daly
December 27, 2018 12:18PM
On Sun, Dec 23, 2018 at 02:21:31PM +0100, A. Schulze wrote:
> cross-posting to horde & nginx lists...

Hi there,

> 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

The nginx directive fastcgi_split_path_info just sets some
internal-to-nginx variables.

To send things like SCRIPT_FILENAME and PATH_INFO to the upstream fastcgi
service, you will have some fastcgi_param directives that use those
variables -- in this case, presumably they are in the "include" file.

> 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.

You can continue to use fastcgi_split_path_info to set some variables.

For uwsgi, you will need some uwsgi_param directives.

You may want to edit whatever default "include" file you use, or perhaps
write the directives directly.

You will want to know what parameter names your upstream uwsgi server
actually uses, and make sure to set those to the values you need.

Good luck with it,

Francis Daly francis@daoine.org
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: 119
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