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
92f5c284
Commit
92f5c284
authored
Oct 23, 2017
by
Fred Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send mcka-api requests to apros
parent
eb9dea8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/extra_locations_lms.j2
+30
-0
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
+6
-0
No files found.
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/extra_locations_lms.j2
View file @
92f5c284
...
...
@@ -9,3 +9,33 @@
expires 604800s;
}
{% endif %}
location /mcka-api/ {
try_files $uri @proxy_to_appros;
}
location @proxy_to_appros {
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://apros_app_server;
if ($host ~* beta\.(.*)) {
set $www_host www.$1;
rewrite ^(.*)$ https://$www_host$1 permanent;
}
# Forward to HTTPS if we're an HTTP request...
if ($http_x_forwarded_proto = "http") {
set $do_redirect "true";
}
# Run our actual redirect...
if ($do_redirect = "true") {
rewrite ^ https://$host$request_uri? permanent;
}
}
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
View file @
92f5c284
...
...
@@ -11,6 +11,12 @@ upstream lms-backend {
}
upstream apros_app_server {
{% for host in nginx_apros_gunicorn_hosts %}
server {{host}}:{{mcka_apros_gunicorn_port}} fail_timeout=0;
{% endfor %}
}
{%- if EDXAPP_ENABLE_RATE_LIMITING -%}
# Make Zone
limit_req_zone $cookie_{{ EDXAPP_SESSION_COOKIE_NAME }} zone=cookies:10m rate={{ EDXAPP_COURSES_REQUEST_RATE }};
...
...
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