title: Nginx variables similar to SetEnv in Apache?
body: <p>I use SetEnv in Apache to set some variables in virtualhosts that I recover in PHP using <code>$_SERVER[the_variable]</code>.</p>
  
  <p>Now I am switching to Perl Catalyst and Nginx, but it seems that the "env" directive in Nginx is not the same. It does not work. How can it be accomplished?</p>
  
  <p>Here is the background picture, just in case someone can suggest a better approach or my previous system does not work with Nginx.</p>
  
  <ul>
  <li>I use the same app for many domains. All data comes from different databases with the same structure.</li>
  <li>The database name is hardcoded to the virtual host, in that environmental variable.</li>
  <li>As I know the database name, all the queries go to its appropriate database, from the very first query.</li>
  <li>I can have multiple domains using the same database, just including the same variable into the directives.</li>
  </ul>