- Create a file named
anything.conf (something like
/var/www/domain.com/conf/ with the content you want.
- Test if everything is fine with
- If the test succeeds, then reload Nginx with
service nginx reload.
Theoretically, that’s all.
However, I nearly always need additional steps. I need to
ee site edit domain.com and move the last include line (
include /var/www/domain.com/conf/nginx/*.conf;) a few positions above, otherwise my custom rules are never interpreted by Nginx.