Docker + Nginx. SRC images displays 127.0.0.1:8083 instead of correct url



  • Hi Guys, I just finished the uvdesk installation (docker + nginx) but I have an issue with images. The src address is generated using the docker address: 127.0.0.1:8083

    For example:

    <a class="uv-logo" href="/en/folder">
    <img src="http://127.0.0.1:8083//assets/website/ewX0qQI6EQdvfI93.jpeg" alt="Knowledgebase">
    </a>

    Website in general works correctly
    Any suggestion?


  • mod admin

    Hi @javier-solis are you installing on localhost or in a webserver that is online?
    What kind of SCR images diplays that?

    Maybe SSH command

    php bin/console c:c
    

    can help? Or maybe the installation URL should be set correctly somewhere. Usually the issue with the URL is for when you need check email from Cron, at the moment I don't have in mind where the issue you are reporting with the logo in the Knowledgebase can be.

    Soon a UVdesk staff will maybe reply to you.
    I approved your post that was in the moderator queue.



  • Thanks for your answer.
    Yes, my uvdesk installation is running in an EC2 instance in AWS. The application runs in a docker container in port 8083.

    Uploaded images are not displayed correctly in the header or attachments:

    Logo:
    4e7be229-a183-4d1d-98e0-ef1e730ede0c-image.png

    Tickets:
    ec2b6bcb-7848-4f15-a3aa-193aeeb58897-image.png

    This is my Nginx configuration:

    server {
            server_name mydomain.com;
            access_log /var/log/nginx/uvdesk-access.log;
            error_log /var/log/nginx/uvdesk-error.log;
            location / {
                 proxy_pass http://127.0.0.1:8083;
            }
    
        listen [::]:443 ssl ipv6only=on; # managed by Certbot
        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    
    }
    server {
        if ($host =mydomain.com) {
            return 301 https://$host$request_uri;
        } # managed by Certbot
    
            listen 80;
            listen [::]:80;
            server_name mydomain.com;
        return 404; # managed by Certbot
    

    This is the dockercompose yml file

    version: '3'
    
    volumes:
        app:
    
    services:
        uvdesk:
            restart: always
            image: uvdesk:latest
            tty: true
    
            environment:
                APP_ENV: prod
                APP_SECRET: HIDDEN
          
                MYSQL_USER: myuvdeskuser
                MYSQL_PASSWORD: HIDDEN
                MYSQL_ROOT_PASSWORD: HIDDEN
                MYSQL_DATABASE: myuvdes
    
            ports:
                - 127.0.0.1:8083:80
    
            volumes:
                - app:/var/www/uvdesk
    

    Docker process:

    CONTAINER ID        IMAGE            COMMAND              REATED     STATUS            PORTS                                                                  NAMES
    *HIDDEN*        uvdesk:latest  "uvdesk-entrypoint.s…" 22 hours ago        Up 22 hours            127.0.0.1:8083->80/tcp                        uvdesk_1
    

    Is there any environment variable to set the BASE URL correctly?

    Thanks for your support.

    Best regards.

    Javier



  • @peopleinside said in Docker + Nginx. SRC images displays 127.0.0.1:8083 instead of correct url:

    php bin/console c:c

    The result of

     php bin/console c:c
    

    7e8a852d-1b6f-4ad8-9399-d68d3444e925-image.png


  • mod admin

    Are you running this in a domain or IP, I mean you can reach the UVdesk with a domain name in the browser bar?
    I'm sorry but I have no idea about Docker and Nginx as I use Apache and used composer for install UVdesk or directly uploaded the zip file and followed the wizard.

    You will need wait for staff reply, they will reply when they can tomorrow maybe.

    I noticed the version you installed has not the version showed in the admin footer side, this can be not the latest updated version. You can try to follow the following guide: https://forums.uvdesk.com/topic/1925/installing-and-setup-uvdesk-for-the-first-time and see if is valid also for Nginx



  • Thanks, @peopleinside just for the record, yes, the instance of uvdesk is accessible via domain.

    Thanks for your help!


  • mod admin

    @javier-solis Yes I see, all works except logo and maybe attachments.
    Is strange maybe is not a full updated version. Let's see if installing from Github, composer with the guide I give to you can be helpful.


Log in to reply