Answer the question
In order to leave comments, you need to log in
[SOLVED] nginx url.rewrite-once analog
The other day I decided to try replacing lighttpd with nginx. However, I can’t overcome the construction of the form (lighttpd.conf):
The script is not mine - wiki.openstreetmap.org/wiki/Microcosm . Used to store "secret" data from JOSM.
All that I managed - when I enter the server/api/ address, I am transferred to server/m/microcosm.php
url.rewrite-once = ( "^/api/(.*)$" => "/m/microcosm.php/$1" )
Answer the question
In order to leave comments, you need to log in
In general it will be something like this. Microcosm did not use it, you probably have to finish the configuration a little.
## Microcosm
location /api/
#location ~ ^/api/(.*)
{
## NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass php_backend; # указать upstream
root /path/to/microcosm/m/; # каталог с microcosm.php или прописать $document_root
fastcgi_index microcosm.php;
include fastcgi_params;
#fastcgi_param QUERY_STRING $query_string;
#fastcgi_param REQUEST_URI $1;
fastcgi_param SCRIPT_FILENAME $document_root/microcosm.php;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question