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
a0af0382
Commit
a0af0382
authored
Nov 06, 2015
by
Fred Smith
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2450 from edx/revert-2322-smarnach/selective-http-auth
Revert
ff670ea8
parents
399635f2
cb50d7bb
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
15 additions
and
59 deletions
+15
-59
playbooks/roles/nginx/defaults/main.yml
+0
-25
playbooks/roles/nginx/tasks/main.yml
+1
-1
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/basic-auth.j2
+2
-0
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/certs.j2
+2
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/cms.j2
+1
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/ecommerce.j2
+0
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/kibana.j2
+1
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms-preview.j2
+2
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
+2
-6
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/ora.j2
+2
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/programs.j2
+0
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/xqueue.j2
+1
-3
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/xserver.j2
+1
-3
No files found.
playbooks/roles/nginx/defaults/main.yml
View file @
a0af0382
...
@@ -113,28 +113,3 @@ nginx_cfg:
...
@@ -113,28 +113,3 @@ nginx_cfg:
NGINX_ROBOT_RULES
:
[
]
NGINX_ROBOT_RULES
:
[
]
NGINX_EDXAPP_EMBARGO_CIDRS
:
[]
NGINX_EDXAPP_EMBARGO_CIDRS
:
[]
CERTS_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
ECOMMERCE_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
EDXAPP_CMS_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
EDXAPP_LMS_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
EDXAPP_LMS_PREVIEW_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
KIBANA_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
ORA_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
PROGRAMS_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
XQUEUE_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
XSERVER_ENABLE_BASIC_AUTH
:
"
{{
COMMON_ENABLE_BASIC_AUTH
}}"
NGINX_CREATE_HTPASSWD_FILE
:
>
{{
CERTS_ENABLE_BASIC_AUTH or
ECOMMERCE_ENABLE_BASIC_AUTH or
EDXAPP_CMS_ENABLE_BASIC_AUTH or
EDXAPP_LMS_ENABLE_BASIC_AUTH or
EDXAPP_LMS_PREVIEW_ENABLE_BASIC_AUTH or
KIBANA_ENABLE_BASIC_AUTH or
ORA_ENABLE_BASIC_AUTH or
PROGRAMS_ENABLE_BASIC_AUTH or
XQUEUE_ENABLE_BASIC_AUTH or
XSERVER_ENABLE_BASIC_AUTH
}}
playbooks/roles/nginx/tasks/main.yml
View file @
a0af0382
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
name={{ COMMON_HTPASSWD_USER }}
name={{ COMMON_HTPASSWD_USER }}
password={{ COMMON_HTPASSWD_PASS }}
password={{ COMMON_HTPASSWD_PASS }}
path={{ nginx_htpasswd_file }}
path={{ nginx_htpasswd_file }}
when
:
NGINX_CREATE_HTPASSWD_FILE
when
:
COMMON_ENABLE_BASIC_AUTH
-
name
:
Create nginx log file location (just in case)
-
name
:
Create nginx log file location (just in case)
file
:
>
file
:
>
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/basic-auth.j2
View file @
a0af0382
{% if COMMON_ENABLE_BASIC_AUTH %}
satisfy any;
satisfy any;
allow 127.0.0.1;
allow 127.0.0.1;
...
@@ -16,3 +17,4 @@
...
@@ -16,3 +17,4 @@
index index.html
index index.html
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Proto https;
{% endif %}
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/certs.j2
View file @
a0af0382
...
@@ -3,9 +3,8 @@ server {
...
@@ -3,9 +3,8 @@ server {
location / {
location / {
root {{ CERTS_WEB_ROOT }};
root {{ CERTS_WEB_ROOT }};
{% if CERTS_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri $uri/valid.html =404;
try_files $uri $uri/valid.html =404;
}
}
}
}
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/cms.j2
View file @
a0af0382
...
@@ -74,9 +74,7 @@ error_page {{ k }} {{ v }};
...
@@ -74,9 +74,7 @@ error_page {{ k }} {{ v }};
}
}
location / {
location / {
{% if EDXAPP_CMS_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_cms_app;
try_files $uri @proxy_to_cms_app;
}
}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/ecommerce.j2
View file @
a0af0382
...
@@ -38,9 +38,6 @@ server {
...
@@ -38,9 +38,6 @@ server {
}
}
location / {
location / {
{% if ECOMMERCE_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app;
try_files $uri @proxy_to_app;
}
}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/kibana.j2
View file @
a0af0382
...
@@ -31,9 +31,7 @@ server {
...
@@ -31,9 +31,7 @@ server {
error_log {{ nginx_log_dir }}/kibana.error.log error;
error_log {{ nginx_log_dir }}/kibana.error.log error;
# Access restriction
# Access restriction
{% if KIBANA_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
# Set image format types to expire in a very long time
# Set image format types to expire in a very long time
location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ {
location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ {
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms-preview.j2
View file @
a0af0382
...
@@ -37,9 +37,8 @@ server {
...
@@ -37,9 +37,8 @@ server {
}
}
location / {
location / {
{% if EDXAPP_LMS_PREVIEW_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_lms-preview_app;
try_files $uri @proxy_to_lms-preview_app;
}
}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
View file @
a0af0382
...
@@ -93,9 +93,7 @@ error_page {{ k }} {{ v }};
...
@@ -93,9 +93,7 @@ error_page {{ k }} {{ v }};
}
}
location / {
location / {
{% if EDXAPP_LMS_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
{% if NGINX_EDXAPP_EMBARGO_CIDRS -%}
{% if NGINX_EDXAPP_EMBARGO_CIDRS -%}
if ( $embargo ) {
if ( $embargo ) {
rewrite ^ /embargo;
rewrite ^ /embargo;
...
@@ -169,9 +167,7 @@ error_page {{ k }} {{ v }};
...
@@ -169,9 +167,7 @@ error_page {{ k }} {{ v }};
error_page 503 = /server/rate-limit.html;
error_page 503 = /server/rate-limit.html;
{%- endif -%}
{%- endif -%}
{% if EDXAPP_LMS_ENABLE_BASIC_AUTH %}
{%- include "basic-auth.j2" %}
{%- include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_lms_app;
try_files $uri @proxy_to_lms_app;
}
}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/ora.j2
View file @
a0af0382
...
@@ -8,9 +8,8 @@ server {
...
@@ -8,9 +8,8 @@ server {
listen {{ ORA_NGINX_PORT }} default_server;
listen {{ ORA_NGINX_PORT }} default_server;
location / {
location / {
{% if ORA_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app;
try_files $uri @proxy_to_app;
}
}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/programs.j2
View file @
a0af0382
...
@@ -38,9 +38,6 @@ server {
...
@@ -38,9 +38,6 @@ server {
}
}
location / {
location / {
{% if PROGRAMS_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app;
try_files $uri @proxy_to_app;
}
}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/xqueue.j2
View file @
a0af0382
...
@@ -8,9 +8,7 @@ server {
...
@@ -8,9 +8,7 @@ server {
listen {{ XQUEUE_NGINX_PORT }} default_server;
listen {{ XQUEUE_NGINX_PORT }} default_server;
location / {
location / {
{% if XQUEUE_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app;
try_files $uri @proxy_to_app;
}
}
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/xserver.j2
View file @
a0af0382
...
@@ -18,9 +18,7 @@ server {
...
@@ -18,9 +18,7 @@ server {
listen {{ XSERVER_NGINX_PORT }} default_server;
listen {{ XSERVER_NGINX_PORT }} default_server;
location / {
location / {
{% if XSERVER_ENABLE_BASIC_AUTH %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_app;
try_files $uri @proxy_to_app;
}
}
...
...
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