On Mon, Jun 7, 2021 at 9:57 AM tedd77 <i...@quantiss.com> wrote:

> Hello, I am encountering an issue with file transfer on Apache guacamole
> behind a reverse proxy. Protocol used RDP, any file size higher than 1M is
> failing with following error : “You do not have permission to upload this
> file. If you require access, please check your system settings, or check
> with your system administrator.” Being aware of file limitation on
> guacamole behind an NGINX, increasing the file size using the
> client_max_body_size did not help, Could be that I am not settings in into
> the right place. I tried in /etc/nginx/nginx.conf as well as into
> /etc/nginx/sites-available/domain_name.conf with no vain. Tried to follow
> these links with no results either.
> http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/file/t1136/nginx.conf
> https://issues.apache.org/jira/browse/GUACAMOLE-1060 Could someone help
> me solve this issue. Best regards


The setting needs to be within the "Location" block in your Nginx file that
proxies to Guacamole. You should have Location block that looks something
like this:

location /guacamole/ {
    proxy_pass http://localhost:8080/guacamole/;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    access_log off;
}

You would need to add the client_max_body_size directive to that
configuration block:

location /guacamole/ {
    proxy_pass http://HOSTNAME:8080/guacamole/;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    access_log off;
    client_max_body_size 1g;
}

And then restart Nginx. I have this implemented in my environment and
it works fine.

-Nick

Reply via email to