Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved permanently error #101

Open
manapshymyr-OB opened this issue Dec 23, 2022 · 0 comments
Open

Moved permanently error #101

manapshymyr-OB opened this issue Dec 23, 2022 · 0 comments

Comments

@manapshymyr-OB
Copy link

manapshymyr-OB commented Dec 23, 2022

Hello everyone!

uwsgi_intercept_errors on;

upstream geoserver_proxy {
  server 10.0.14.84:8080;
}

upstream ziplist {
        server 10.0.14.84:5555;

}

# Expires map
map $sent_http_content_type $expires {
  default                    off;
  text/html                  epoch;
  text/css                   max;
  application/javascript     max;
  ~image/                    max;
}


server {
    listen 5555;

    location /reports/ {
        alias /opt/geonode/;
        add_header X-Archive-Files 'zip';

        # this line sets the name of the zip that the user gets
        add_header Content-Disposition 'attachment; filename=example.zip';
        
    }
}


server {
  listen 80 default_server;
  listen [::]:80 default_server;

  root /var/www/html;
  index index.html index.htm index.nginx-debian.html;

  server_name _;

  charset utf-8;

  etag on;
  expires $expires;
  proxy_read_timeout 600s;
  # set client body size to 2M #
  client_max_body_size 50000M;

  location / {
    etag off;
    uwsgi_pass 127.0.0.1:8000;
    uwsgi_read_timeout 600s;
    include uwsgi_params;
  }

  location /static/ {
    alias /opt/geonode/geonode/static_root/;
  }

  location /uploaded/ {
    alias /opt/geonode/geonode/uploaded/;
  }

  location /reports/ {
    alias /opt/geonode/;
    # hides the header to the user
    proxy_hide_header X-Archive-Files;
    

        # I don't remember if this is needed
    proxy_set_header Accept-Encoding "";

        # I don't know what this means
    proxy_pass_request_headers off;

        # pass the request to server B
    proxy_pass http://ziplist;
  }

  location /geoserver {
    proxy_pass http://geoserver_proxy;
    include proxy_params;
  }
}

I have this config on my Nginx, but I am getting a 301 Moved Permanently error when I download the folder from /opt/ as a zip. What is wrong? I am trying http://10.0.14.84/reports/kalkan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant