Skip to content

Commit

Permalink
Merge pull request #2 from roocs/update-http
Browse files Browse the repository at this point in the history
update nginx config
  • Loading branch information
cehbrecht authored Mar 13, 2023
2 parents a4aaa3f + b9cab33 commit d2f4a96
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 33 deletions.
5 changes: 5 additions & 0 deletions roles/roocs/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: restart nginx
service:
name: nginx
state: restarted
5 changes: 5 additions & 0 deletions roles/roocs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
template:
src: ./templates/nginx.conf.j2
dest: "{{ nginx_conf_path }}/nginx.conf"

- name: Assure nginx running at end of playbook
command: /bin/true
notify:
- restart nginx
34 changes: 1 addition & 33 deletions roles/roocs/templates/nginx.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,39 +39,7 @@ http {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;

location / {
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}

# Serve C3S-CORDEX data
location {{ roocs_data_base }}/esg_c3s-cordex/ {
alias {{ roocs_data_c3s_cordex }};
}

# Serve C3S-CMIP5 data
location {{ roocs_data_base }}/esg_c3s-cmip5/ {
alias {{ roocs_data_c3s_cmip5 }};
}

# Serve C3S-CMIP6 data
location {{ roocs_data_base }}/esg_c3s-cmip6/ {
alias {{ roocs_data_c3s_cmip6 }};
}

# Serve C3S-IPCC-AR6-Atlas data
location {{ roocs_data_base }}/esg_c3s-ipcc-atlas/ {
alias {{ roocs_data_c3s_ipcc_atlas }};
}

return 301 https://$host$request_uri;
}

# Settings for a TLS enabled server.
Expand Down

0 comments on commit d2f4a96

Please sign in to comment.