Hello,
For web hosting control panels it's hard to support nginx as an apache replacement because of no .htaccess support and no easy way for customers to add their own rewrite rules. It would be great to have a configuration option for URI rewrites only (ngx_http_rewrite_module directives), something like:
include_rewrites /usr/local/nginx/users/username.conf
It would then accept rewrites-only there, so that customers couldn't change their docroot, proxying and other settings. Another way would be just to include functionality in nginx binary, which would check if file specified is safe & syntax of it is correct to include (something like "nginx -t", but for user files only). That way control panels could just do something like (-u = user):
nginx -t -u -c /usr/local/nginx/users/username.conf
If nginx reports that the file is safe to include and contains ngx_http_rewrite_module provided directives only, then control panels could just add "include /usr/local/nginx/users/username.conf;" to the configurable server block, otherwise it would just error and ask customer to review his configuration file.
Please let me know you thoughts about that :)
Thank you for the attention!