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
OpenEdx
configuration
Commits
4d4a5a37
Commit
4d4a5a37
authored
Nov 03, 2014
by
Edward Zarecor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remote maintenance site.
parent
67269c44
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
4 deletions
+54
-4
playbooks/roles/nginx/defaults/main.yml
+7
-0
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/cms.j2
+16
-2
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
+16
-2
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/s3_maintenance.j2
+15
-0
No files found.
playbooks/roles/nginx/defaults/main.yml
View file @
4d4a5a37
...
...
@@ -62,6 +62,13 @@ nginx_debian_pkgs:
-
nginx
-
python-passlib
NGINX_EDXAPP_ENABLE_S3_MAINTENANCE
:
False
nginx_default_error_page
:
"
/server/server-error.html"
NGINX_EDXAPP_ERROR_PAGES
:
"
500"
:
"
{{
nginx_default_error_page}}"
"
502"
:
"
{{
nginx_default_error_page}}"
"
504"
:
"
{{
nginx_default_error_page}}"
CMS_HOSTNAME
:
'
~^((stage|prod)-)?studio.*'
nginx_template_dir
:
"
edx/app/nginx/sites-available"
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/cms.j2
View file @
4d4a5a37
...
...
@@ -13,8 +13,22 @@ upstream cms-backend {
server {
# CMS configuration file for nginx, templated by ansible
# 500 error pages
error_page 500 502 504 /server/server-error.html;
# Proxy to a remote maintanence page
{% if NGINX_EDXAPP_ENABLE_S3_MAINTENANCE %}
# Do not include a 502 error in NGINX_ERROR_PAGES when
# NGINX_EDXAPP_ENABLE_S3_MAINTENANCE is enabled.
error_page 502 @maintenance;
{% include "s3_maintenance.j2" %}
{% endif %}
# error pages
{% for k, v in NGINX_EDXAPP_ERROR_PAGES.iteritems() %}
error_page {{ k }} {{ v }};
{% endfor %}
{% if NGINX_ENABLE_SSL %}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
View file @
4d4a5a37
...
...
@@ -18,8 +18,22 @@ limit_req_zone $cookie_{{ EDXAPP_SESSION_COOKIE_NAME }} zone=cookies:10m rate={{
server {
# LMS configuration file for nginx, templated by ansible
# 500 error pages
error_page 500 502 504 /server/server-error.html;
{% if NGINX_EDXAPP_ENABLE_S3_MAINTENANCE %}
# Do not include a 502 error in NGINX_ERROR_PAGES when
# NGINX_EDXAPP_ENABLE_MAINTENANCE is enabled.
error_page 502 @maintenance;
{% include "s3_maintenance.j2" %}
{% endif %}
# error pages
{% for k, v in NGINX_EDXAPP_ERROR_PAGES.iteritems() %}
error_page {{ k }} {{ v }};
{% endfor %}
{% if NGINX_ENABLE_SSL %}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/s3_maintenance.j2
0 → 100644
View file @
4d4a5a37
{% if NGINX_EDXAPP_ENABLE_S3_MAINTENANCE %}
location @maintenance {
rewrite ^(.*) {{ NGINX_EDXAPP_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