I have enough understanding on Nginx configuration file concepts and syntax. I also get that using multiple configuration files has architectural advantages, i.e. global configuration that never changes can live in it’s own file, individual domain specific configurations can be linked in sites-enabled, etc.
What I don’t understand is how these multiple config files come together to work as a whole. Nginx.org does not cover this subject as far as I could tell. I found one tutorial here that uses “include” calls to reference other configuration files but so far I have been unable to make this example work without Nginx reporting an error when I reload the configuration.
Does anyone know of a manual that addresses the use of multiple configuration files?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
All the individual vhost config files get included with a line in the main config file:
include /etc/nginx/sites-enabled/*;
http://publications.jbfavre.org/web/nginx-vhosts-automatiques-avec-SSL-et-authentification.en
Whats the nginx error you get?
Thanks for that link. I think I may have had some nonsensical include statements from copying and pasting other people’s sample configurations. I need to sit down and map out what I need to accomplish on paper first.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.