polonel / trudesk

:coffee: :seedling: Trudesk is an open-source help desk/ticketing solution.
http://trudesk.io
Other
1.29k stars 430 forks source link

Cannot access public folder from subdomain #680

Closed tufantoksoz closed 2 months ago

tufantoksoz commented 2 months ago

Is this a BUG REPORT or FEATURE REQUEST?:

What happened: If I open trudesk with the server ip address and log in, I can see the user profile picture and ticket attachments, but when I use the subdomain, I cannot access the uploads folder. I did not make any changes in the docker-compose file.

What did you expect to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

` server { listen 80; server_name mysub.domain.com;

    location ~ ^/(uploads/) {
            root /usr/src/trudesk/public;
            access_log off;
            expires modified +1h;
    }

    location / {
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_http_version 1.1;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $host;
            proxy_cache_key trudesk$request_uri$scheme;
            proxy_pass http://socket_nodes;
            proxy_redirect http://socket_nodes http://socket_nodes;
    }

    # redirect server error pages to the static page /50x.html
    # in the even that the trudesk instance is down, these pages will serve.
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
    }
}`

Ekran görüntüsü 2024-07-09 184340 Ekran görüntüsü 2024-07-09 184443

Environment:

tufantoksoz commented 2 months ago

this nginx conf solved my issue

location /uploads {
                proxy_pass https://mysub.domain.com/uploads;
        }