Modify Nginx load order

May 09, 2023 · 1 min read · Post a comment

In Nginx, the configuration files are loaded in a specific order by default. However, you can modify the load order to customize the behavior of the server.


  • Nginx


To create a custom load order, open nginx.conf and order config files load by including them one after each other. In the http block you can have something like this:

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/custom-configs/*.conf;

As an alternative way, you could always prefix files. For instance, you can have: 00-devcoops.conf,, 02-wildcard.conf, etc …


In case you face any issues, feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.