forked from evolix/ansible-roles
redmine: use custom errors-pages in Nginx vhost
This commit is contained in:
parent
360150d57b
commit
490708c76d
|
@ -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
|
||||
|
|
|
@ -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,14 +31,13 @@ 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;
|
||||
}
|
||||
try_files $uri @puma;
|
||||
if (!-f /home/{{ redmine_user }}/run/puma.pid) {
|
||||
return 502;
|
||||
}
|
||||
|
||||
location @maintenance {
|
||||
rewrite ^(.*)$ /500.html break;
|
||||
try_files $uri @puma;
|
||||
}
|
||||
|
||||
location @puma {
|
||||
|
|
Loading…
Reference in a new issue