I use ISPConfig 3 with Nginx as a reverse proxy. when I put some settings in "Proxy Directives" field and save it, they are applied but when I put them in "nginx Directives" field and save it, they aren't applied. why is it so?
when I put custom settings in "Proxy Directives" field, it saves in "location / {}" block in nginx .vhost file. but I want to save it in server{} block. What should I do?
Put it in the nginx directives field. If it is not saved, you know your directives were invalid, and Nginx could not start with your custom configuration. In this case, the last working config is used and the non-working config is saved with .err file ending in the nginx sites-available folder.
my directives are valid and when I put it directly in .vhost file and restart nginx, every thing is good and there is no problem. for example when I put the following directive in nginx Directives field, ispconfig doesn't save it and there is not any .err file. location ~* \.(eot|svg|ttf|woff|woff2)$ { expires 60m; } what I noticed is that, when I changed the Redirect Type to proxy, content in nginx Directives field not saved but about other options in Redirect Type, content is saved.
When you do a proxy redirect, options in the nginx field do not matter and are discarded, as it means that all traffic is proxied to another website via proxy. If you want to use custom nginx directives, do not enable proxy and then put your directives in the custom nginx directives field, these custom directives may also contain proxy directives in case you want to set up a custom proxy which does not match the default settings from ISPConfig.
Thank you Till for your help I changed "Redirect Type" to "No redirect" and put my proxy rules and custom nginx directives to nginx directives field and my problem was solved.