Browse Source

redmine: use custom errors-pages in Nginx vhost

nagios-sudoers
Victor LABORIE 3 years ago
parent
commit
490708c76d
  1. 1
      CHANGELOG.md
  2. 11
      redmine/templates/nginx.conf.j2

1
CHANGELOG.md

@ -22,6 +22,7 @@ The **patch** part changes incrementally at each release.
* rbenv: update defaults rbenv version to 1.1.2 and ruby version to 2.5.5
* redmine: update default version to 4.0.3
* nagios-nrpe: change required status code for http and https check
* redmine: use custom errors-pages in Nginx vhost
### Fixed
* rbenv: add check_mode for check rbenv and ruby versions

11
redmine/templates/nginx.conf.j2

@ -17,10 +17,10 @@ server {
root /home/{{ redmine_user }}/www/public;
access_log /var/log/nginx/{{ redmine_user }}_access.log;
error_log /var/log/nginx/{{ redmine_user }}_error.log;
error_page 503 @maintenance;
client_max_body_size 50M;
include /etc/nginx/snippets/letsencrypt[.]conf;
include /etc/nginx/snippets/errors-pages[.]conf;
gzip on;
gzip_disable "msie6";
@ -31,16 +31,15 @@ server {
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript;
location / {
if (!-f /home/{{ redmine_user }}/run/puma.pid) {
if (-f /home/{{ redmine_user }}/maintenance.lock) {
return 503;
}
if (!-f /home/{{ redmine_user }}/run/puma.pid) {
return 502;
}
try_files $uri @puma;
}
location @maintenance {
rewrite ^(.*)$ /500.html break;
}
location @puma {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;

Loading…
Cancel
Save