Score:0

Nginx Configuration for an RDAP Server?

in flag

I'm trying to set up an nginx configuration for a web server to process Registration Data Access protocol (RDAP, see RFC 9082) requests. The URIs used to submit RDAP queries are of the form "https://server/". Examples: "https://example.com/rdap/help", or "https://example.com/rdap/domain/example.com".

How can I create a location block in my nginx configuration to process requests like this such that everything after the "rdap" in the URI is passed to an index.php file for processing? Here's what I've been trying to work with:

location ~* /rdap {
    root /var/www/;
    index index.php;
    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
}

I have my index.php file located at /var/www/rdap/index.php. This config produces a "file not found" error for the "https://example.com/rdap/help" query because I don't have a file/directory named "help" in my local file system. Is it possible to have the "rdap" location matched, and then send the rest of the URI to my index.php file for processing?

us flag
Please add the output of `nginx -T` to the question so we can see the full nginx configuration.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.