I have a virtual /xmlrpc.php route on my Drupal site. It's for legacy compatibility. With the default DDEV configuration, nginx returns "No input file specified." when I visit https://mysite.ddev.local/xmlrpc.php.

How can I make it ask Drupal to handle the request instead?

1 Answers

1
wizonesolutions On

This answer assumes the use of DDEV 1.8.0+.

Create a new file in the nginx subfolder of your project's .ddev directory, e.g. .ddev/nginx/xmlrpc.conf. (The file can be named anything as long as it ends in .conf.)

Paste in the following:

# pass the PHP scripts to FastCGI server listening on socket
location = '/xmlrpc.php' {
  try_files $uri @rewrite;
}

Run ddev start to recreate the web container.

This pattern, also used for things like handling /system/files paths (for Drupal private files), will prefer a real xmlrpc.php file if it exists, and otherwise will ask Drupal's index.php (and routing system) to handle the request.