settings.php not in expected location(s) We are trying to change the database settings for a long-standing drupal 6 site, but are having trouble finding the correct settings.php file:

$ cd /var/www/vhosts/mysite
$ find sites/ -name "settings.php*"
sites/default/settings.php.save
sites/default/settings.php.mod2
sites/mobile.mysite.com/settings.php
sites/mysite.com/settings.php
sites/mysite.com/settings.php.pre_handoff_unedited
sites/mysite.com/settings.php~
sites/mysite.com/settings.php.20131022


We renamed the two most likely suspects, but the sites continues to run smoothly:

sites/mobile.mysite.com/settings.php_hold
sites/mysite.com/settings.php_hold


I also looked for a sites.php that might be overriding settings.php, but we don't seem to have one of those either: 

$ find sites/ -name "*sites.php*"
$


Which means I can't find a sites.php or settings.php anywhere in the web directory that seems to control drupal.

We have nginx set up to receive http requests and mysite.com requests are forwarded to apache.  Could that be relevant?  Where else I might look for the drupal config settings?
You should search for setting file as:

find sites/ -name settings.php


as the file won't have any other name than settings.php (unless included from settings.php).

So you're down with these 2 valid entries:

sites/mobile.mysite.com/settings.php
sites/mysite.com/settings.php


Normally when you have settings.php in sites/default it applies to all sites, unless overridden by the site specific file (which is the case).

So:


sites/mobile.mysite.com will work on sites like mobile.mysite.com
sites/mysite.com/settings.php works on sites like mysite.com




Here is example from default.settings.php documentation page:

For example, for a fictitious site installed at http://www.drupal.org/mysite/test/, the settings.php file is searched in the following directories:


sites/www.drupal.org.mysite.test
sites/drupal.org.mysite.test
sites/org.mysite.test
sites/www.drupal.org.mysite
sites/drupal.org.mysite
sites/org.mysite
sites/www.drupal.org
sites/drupal.org
sites/org
sites/default



  The configuration directory will be discovered by stripping the website's hostname from left to right and pathname from right to left. The first configuration file found will be used and any others will be ignored. If no other configuration file is found then the default configuration file at sites/default will be used.




If you're still confused, please run drush status command to find the right settings file, e.g.

$ drush status | grep settings
 Drupal Settings File            :  sites/default/settings.php


or for specific site:

$ drush -l http://mobile.mysite.com status | grep settings