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
59d54fdb
Commit
59d54fdb
authored
Jan 08, 2016
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified the remaining templates
parent
277c7b70
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
7 deletions
+49
-7
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/cms.j2
+1
-1
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/ecommerce.j2
+7
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/insights.j2
+7
-1
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/kibana.j2
+26
-0
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
+1
-1
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/programs.j2
+7
-1
No files found.
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/cms.j2
View file @
59d54fdb
...
...
@@ -59,7 +59,7 @@ error_page {{ k }} {{ v }};
{
set $do_redirect_to_https "true";
}
{% endif %}
{% endif %}
# Execute the actual redirect
if ($do_redirect_to_https = "true")
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/ecommerce.j2
View file @
59d54fdb
...
...
@@ -30,20 +30,24 @@ server {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
{% endif %}
# Nginx does not support nested condition or or conditions so
# there is an unfortunate mix of conditonals here.
{% if NGINX_REDIRECT_TO_HTTPS %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "scheme" %}
# Redirect http to https over single instance
if ($scheme != "https")
{
set $do_redirect_to_https "true";
}
# Nginx does not support nested conditions
{% endif %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "forward_for_proto" %}
# Forward to HTTPS if we're an HTTP request... and the server is behind ELB
if ($http_x_forwarded_proto = "http")
{
set $do_redirect_to_https "true";
}
{% endif %}
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/insights.j2
View file @
59d54fdb
...
...
@@ -33,20 +33,26 @@ location @proxy_to_app {
proxy_pass http://insights_app_server;
}
# Nginx does not support nested condition or or conditions so
# there is an unfortunate mix of conditonals here.
{% if NGINX_REDIRECT_TO_HTTPS %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "scheme" %}
# Redirect http to https over single instance
if ($scheme != "https")
{
set $do_redirect_to_https "true";
}
{% endif %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "forward_for_proto" %}
# Nginx does not support nested conditions
# Forward to HTTPS if we're an HTTP request... and the server is behind ELB
if ($http_x_forwarded_proto = "http")
{
set $do_redirect_to_https "true";
}
{% endif %}
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/kibana.j2
View file @
59d54fdb
...
...
@@ -22,7 +22,33 @@ server {
{% else %}
listen {{ KIBANA_NGINX_PORT }} {{ default_site }};
{% endif %}
# Nginx does not support nested condition or or conditions so
# there is an unfortunate mix of conditonals here.
{% if NGINX_REDIRECT_TO_HTTPS %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "scheme" %}
# Redirect http to https over single instance
if ($scheme != "https")
{
set $do_redirect_to_https "true";
}
{% endif %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "forward_for_proto" %}
# Forward to HTTPS if we're an HTTP request... and the server is behind ELB
if ($http_x_forwarded_proto = "http")
{
set $do_redirect_to_https "true";
}
{% endif %}
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
}
{% endif %}
server_name {{ KIBANA_SERVER_NAME }};
root {{ kibana_app_dir }}/htdocs;
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
View file @
59d54fdb
...
...
@@ -79,7 +79,7 @@ error_page {{ k }} {{ v }};
{
set $do_redirect_to_https "true";
}
{% endif %}
{% endif %}
# Execute the actual redirect
if ($do_redirect_to_https = "true")
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/programs.j2
View file @
59d54fdb
...
...
@@ -31,20 +31,26 @@ server {
{% endif %}
# Nginx does not support nested condition or or conditions so
# there is an unfortunate mix of conditonals here.
{% if NGINX_REDIRECT_TO_HTTPS %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "scheme" %}
# Redirect http to https over single instance
if ($scheme != "https")
{
set $do_redirect_to_https "true";
}
{% endif %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "forward_for_proto" %}
# Nginx does not support nested conditions
# Forward to HTTPS if we're an HTTP request... and the server is behind ELB
if ($http_x_forwarded_proto = "http")
{
set $do_redirect_to_https "true";
}
{% endif %}
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
rewrite ^ https://$host$request_uri? permanent;
...
...
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