Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
c6c82f12
Commit
c6c82f12
authored
Mar 22, 2018
by
Albert St. Aubin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the NGINX configuration for IDAs to return a maintenance page
[LEARNER-4264]
parent
20f31389
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
0 deletions
+37
-0
CHANGELOG.md
+5
-0
playbooks/roles/edx_django_service/defaults/main.yml
+4
-0
playbooks/roles/edx_django_service/templates/edx/app/nginx/sites-available/app.j2
+10
-0
playbooks/roles/edx_django_service/templates/edx/app/nginx/sites-available/s3_maintenance.j2
+18
-0
No files found.
CHANGELOG.md
View file @
c6c82f12
-
Role edx_django_service
-
Added maintenance page under the flag EDX_DJANGO_SERVICE_ENABLE_S3_MAINTENANCE.
-
Added the s3_maintenance.j2 file to point to the s3 maintenance page.
-
Role: xqueue
-
Added XQUEUE_MYSQL_CONN_MAX_AGE so that you can have xqueue use django's persistent DB connections
-
Role: edxapp
-
Added empty
`EDXAPP_PASSWORD_COMPLEXITY`
setting to ease overriding complexity.
...
...
playbooks/roles/edx_django_service/defaults/main.yml
View file @
c6c82f12
...
...
@@ -68,6 +68,10 @@ nginx_edx_django_service_gunicorn_hosts:
edx_django_service_hostname
:
'
~^((stage|prod)-)?{{
edx_django_service_name
}}.*'
edx_django_service_nginx_port
:
'
1{{
edx_django_service_gunicorn_port
}}'
EDX_DJANGO_SERVICE_ENABLE_S3_MAINTENANCE
:
true
EDX_DJANGO_SERVICE_S3_MAINTENANCE_FILE
:
"
/edx-static/maintenance/maintenance.html"
edx_django_service_ssl_nginx_port
:
'
4{{
edx_django_service_gunicorn_port
}}'
edx_django_service_enable_basic_auth
:
false
edx_django_service_basic_auth_exempted_paths_default
:
...
...
playbooks/roles/edx_django_service/templates/edx/app/nginx/sites-available/app.j2
View file @
c6c82f12
...
...
@@ -30,6 +30,16 @@ default "null";
server {
server_name {{ edx_django_service_hostname }};
{% if EDX_DJANGO_SERVICE_ENABLE_S3_MAINTENANCE %}
# Do not include a 502 error in NGINX_ERROR_PAGES when
# EDX_DJANGO_SERVICE_ENABLE_S3_MAINTENANCE is enabled.
error_page 502 @maintenance;
{% include "s3_maintenance.j2" %}
{% endif %}
{% if NGINX_ENABLE_SSL %}
listen {{ edx_django_service_nginx_port }} {{ default_site }};
...
...
playbooks/roles/edx_django_service/templates/edx/app/nginx/sites-available/s3_maintenance.j2
0 → 100644
View file @
c6c82f12
# This file was copied from playbooks/roles/nginx/templates/edx/app/nginx/sites-available/
# modifications should be made to both files if necessary.
{% if EDX_DJANGO_SERVICE_ENABLE_S3_MAINTENANCE %}
location @maintenance {
rewrite ^(.*) {{ EDX_DJANGO_SERVICE_S3_MAINTENANCE_FILE }} break;
proxy_http_version 1.1;
proxy_set_header Host s3.amazonaws.com;
proxy_set_header Authorization '';
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
proxy_hide_header Set-Cookie;
proxy_ignore_headers "Set-Cookie";
proxy_buffering off;
proxy_intercept_errors on;
proxy_pass https://s3.amazonaws.com;
}
{% endif %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment