Nginx shared directives

Solution 1:

You can create a new file in /etc/nginx containing your shared directives, and then include them in each site's configuration.

The config files which ship with nginx include an example of this: fastcgi_params contains shared directives that are used in various configuration files where they call include fastcgi_params;.