Commit 9fffe2f0 by John Jarvis

Merge pull request #1735 from edx/jarv/nginx-links

moving sites-enabled to /etc/nginx/sites-enabled
parents f4006541 b09d2d9c
...@@ -54,7 +54,7 @@ nginx_server_static_dir: "{{ nginx_data_dir }}/server-static" ...@@ -54,7 +54,7 @@ nginx_server_static_dir: "{{ nginx_data_dir }}/server-static"
nginx_conf_dir: "{{ nginx_app_dir }}/conf.d" nginx_conf_dir: "{{ nginx_app_dir }}/conf.d"
nginx_log_dir: "{{ COMMON_LOG_DIR }}/nginx" nginx_log_dir: "{{ COMMON_LOG_DIR }}/nginx"
nginx_sites_available_dir: "{{ nginx_app_dir }}/sites-available" nginx_sites_available_dir: "{{ nginx_app_dir }}/sites-available"
nginx_sites_enabled_dir: "{{ nginx_app_dir }}/sites-enabled" nginx_sites_enabled_dir: "/etc/nginx/sites-enabled"
nginx_user: root nginx_user: root
nginx_htpasswd_file: "{{ nginx_app_dir }}/nginx.htpasswd" nginx_htpasswd_file: "{{ nginx_app_dir }}/nginx.htpasswd"
nginx_default_sites: [] nginx_default_sites: []
...@@ -65,10 +65,10 @@ nginx_debian_pkgs: ...@@ -65,10 +65,10 @@ nginx_debian_pkgs:
NGINX_EDXAPP_ENABLE_S3_MAINTENANCE: False NGINX_EDXAPP_ENABLE_S3_MAINTENANCE: False
nginx_default_error_page: "/server/server-error.html" nginx_default_error_page: "/server/server-error.html"
NGINX_EDXAPP_ERROR_PAGES: NGINX_EDXAPP_ERROR_PAGES:
"500": "{{ nginx_default_error_page}}" "500": "{{ nginx_default_error_page }}"
"502": "{{ nginx_default_error_page}}" "502": "{{ nginx_default_error_page }}"
"504": "{{ nginx_default_error_page}}" "504": "{{ nginx_default_error_page }}"
CMS_HOSTNAME: '~^((stage|prod)-)?studio.*' CMS_HOSTNAME: '~^((stage|prod)-)?studio.*'
nginx_template_dir: "edx/app/nginx/sites-available" nginx_template_dir: "edx/app/nginx/sites-available"
......
...@@ -31,11 +31,17 @@ ...@@ -31,11 +31,17 @@
apt: pkg={{','.join(nginx_debian_pkgs)}} state=present apt: pkg={{','.join(nginx_debian_pkgs)}} state=present
notify: restart nginx notify: restart nginx
- name: Remove the default site
file: >
path=/etc/nginx/sites-enabled/default
state=absent
notify: reload nginx
- name: Server configuration file - name: Server configuration file
template: > template: >
src=etc/nginx/nginx.conf.j2 dest=/etc/nginx/nginx.conf src=etc/nginx/nginx.conf.j2 dest=/etc/nginx/nginx.conf
owner=root group={{ common_web_user }} mode=0644 owner=root group={{ common_web_user }} mode=0644
notify: reload nginx notify: restart nginx
- name: Creating common nginx configuration - name: Creating common nginx configuration
template: > template: >
......
...@@ -62,7 +62,7 @@ http { ...@@ -62,7 +62,7 @@ http {
# Virtual Host Configs # Virtual Host Configs
## ##
include {{ nginx_sites_enabled_dir }}/*;
include {{ nginx_conf_dir }}/*.conf; include {{ nginx_conf_dir }}/*.conf;
include {{ nginx_sites_enabled_dir }}/*;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment