June 12, 2012 12:02AM
I've got two sites, example.com and beta.example.com. The configuration for these two sites is almost identical, except for the root directory (/var/www/sitename/live/public/ for the first domain, and /var/www/sitename/beta/public/ for the second domain) and a few environment variables (database name, etc.) used by the code. What's the best way to share as much of the Nginx configuration as possible between the two sites? Should I pull the common settings into an include file and include it in both of the server blocks, or is there a better way?

Thanks!

- Daniel
Subject Author Posted

Sharing config between two sites

Daniel15 June 12, 2012 12:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready