@conformist
There are
two matters that you have to distinguish:
1 - a potential issue with your location block and the allow/deny directives, (and)
2 - the server block setup, especially the hidden part (see "..."),
and the hidden part makes it actually quite difficult to come to a solid conclusion.
However, given the odd result associated with the deny directive AND the nature of behaviour of Nginx, I am pretty sure that I can
safely assume the following:
- you
should not omit the root directive: you can place it in the location directive
- you are placing the redmine config in a domain that has been created with Plesk: this is not always the best solution!
In essence, there are
two solutions:
A - Apply additional Nginx directives via Plesk Panel
Go to "Domains > [domain] (select) > Apache & nginx Settings (click) > Additional nginx directives", add the root to the location directive and place the entire location directive (without any server block directive) in the textbox and click "OK" to save and test the Nginx config.
This solution
should work, but it is not optimal.
B - Custom setup (
recommended)
Open a SSH terminal and go to /etc/nginx/conf.d and a file with the name redmine.conf and contents:
server {
...
# Setup redmine public page
root /var/www/redmine/public;
# closing webogram from external queries
location /plugin_assets/redmine_telegram_common/webogram {
allow 127.0.0.1;
deny all;
}
}
and
make sure that the server name declared in this directive is identical to the server name declared in the normal Nginx conf for the domain created with Plesk.
Nginx will now match requests for the redmine application with the directives in redmine.conf, while all other functionality of Plesk is handled in the default way.
This method allows you to have a better control over redmine, reduce conflicts (between redmine and standard Nginx config for Plesk), while still being able to serve some standard tasks/requests/applications via Plesk and the associated default Nginx config.
One of the many reasons why this is the better approach, can be made clear with a small example: in the case of repairing a config issue with a standard Plesk tool and/or an update that affects default config structure, there is the chance that your config will be overwritten. The custom setup will never be overwritten, unless you will explicitly remove packages with a package installer and a "purge" flag.
This (second) method
should work, but I have not tested it.
In summary, just try option B and let me know what happens!
Regards.........
PS Even the (second) method is working directly, you should still be aware of the fact that you would have to do some tweaking to get an optimal Nginx config for redmine.