Skip to content

Commit

Permalink
[fix] Fixed alias traversing issue in nginx configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Jun 29, 2021
1 parent 46de24b commit 84358a3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions templates/nginx.j2
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ server {
}

{% if openwisp2_admin_allowed_network %}
location /admin {
location /admin/ {
try_files {{ openwisp2_path }}/public_html/maintenance.html $uri @uwsgi;
allow {{ openwisp2_admin_allowed_network }};
deny all;
}
{% endif %}

location /static {
location /static/ {
alias {{ openwisp2_path }}/static/;
}

location /media {
location /media/ {
alias {{ openwisp2_path }}/media/;
}
}
Expand Down Expand Up @@ -113,11 +113,11 @@ server {
return 301 https://$host$request_uri;
}

location /static {
location /static/ {
alias {{ openwisp2_path }}/static/;
}

location /media {
location /media/ {
alias {{ openwisp2_path }}/media/;
}
{% else %}
Expand Down

0 comments on commit 84358a3

Please sign in to comment.