Taiga install problem on Ubuntu 22.04 lts arm

Hello,

I’m following this tutorial.
=> Install Taiga in Production
I have install the taiga.conf in the nginx conf file so.

Problem I have in logs are theses ones:

2023/10/21 11:08:11 [crit] 722253#722253: *1 stat() "/home/taiga/taiga-front-dist/dist/" failed (13: Permission denied), client: 84.74.230.22, server: taiga.xxxxxxxxxxx.com, request: "GET / HTTP/1.1", host: "taiga.xxxxxxxxxxx.com"
2023/10/21 11:08:11 [crit] 722253#722253: *1 stat() "/home/taiga/taiga-front-dist/dist/" failed (13: Permission denied), client: 84.74.230.22, server: taiga.xxxxxxxxxxx.com, request: "GET / HTTP/1.1", host: "taiga.xxxxxxxxxxx.com"
2023/10/21 11:08:11 [crit] 722253#722253: *1 stat() "/home/taiga/taiga-front-dist/dist/index.html" failed (13: Permission denied), client: 84.74.230.22, server: taiga.xxxxxxxxxxx.com, request: "GET / HTTP/1.1", host: "taiga.xxxxxxxxxxx.com"

==> /home/taiga/logs/nginx.access.log <==
XX.XX.XXX.XX - - [21/Oct/2023:11:08:11 +0000] "GET / HTTP/1.1" 404 134 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0"
^C

Here the rights on the folder

ubuntu@ip-XXX-XX-XX-XXX:/home$ sudo ls -l taiga/
total 20
drwxrwxr-x  2 taiga taiga 4096 Oct  9 18:43 logs
drwxrwxr-x 14 taiga taiga 4096 Oct  9 18:39 taiga-back
drwxrwxr-x  8 taiga taiga 4096 Oct  9 18:53 taiga-events
drwxrwxr-x  6 taiga taiga 4096 Oct  9 18:30 taiga-front-dist
drwxrwxr-x  8 taiga taiga 4096 Oct  9 18:41 taiga-protected

Do I need to play an extra command to let nginx access the user “taiga” home subfolders?

Thanks for help

Hi there!

You need to make sure that nginx user (can be nginx or www-data) can access the root directories.

As of now, you are giving execute permission to taiga-front-dist. It seems the root folder is taiga-front-dist/dist, so make sure that folder also has execute permissions.

Regards!

1 Like

Hello,

Yes I need to fix the rights on parent folder like this

sudo chown www-data -R  /home/taiga

I know have front working but saying there is an error.

And error are theses one:

XX.XX.XXX.XX - - [30/Oct/2023:20:37:46 +0000] "GET /discover HTTP/1.1" 200 57020 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"

==> /home/taiga/logs/nginx.error.log <==
2023/10/30 20:37:47 [error] 1378320#1378320: *30 connect() failed (111: Unknown error) while connecting to upstream, client: XX.XX.XXX.XX, server: taiga.xxxxxxxxxxxxxx.com, request: "GET /events HTTP/1.1", upstream: "http://127.0.0.1:8888/events", host: "taiga.xxxxxxxxxxxx.com"

==> /home/taiga/logs/nginx.access.log <==
84.74.230.22 - - [30/Oct/2023:20:37:47 +0000] "GET /events HTTP/1.1" 502 166 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"

==> /home/taiga/logs/nginx.error.log <==
2023/10/30 20:38:19 [error] 1378320#1378320: *32 connect() failed (111: Unknown error) while connecting to upstream, client: XX.XX.XXX.XX, server: taiga.xxxxxxxxxxxx.com, request: "GET /events HTTP/1.1", upstream: "http://127.0.0.1:8888/events", host: "taiga.xxxxxxxxxxxxxxxx.com"

==> /home/taiga/logs/nginx.access.log <==
XX.XX.XXX.XX - - [30/Oct/2023:20:38:19 +0000] "GET /events HTTP/1.1" 502 166 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"

If someone has an idea, thanks.

Hi @Dreamer

please share your nginx site config. It might be related to the referrer policy.

Thanks and regards

Hello,

I have followed tutorial here
=> Install Taiga in Production

Here my nginx config /etc/nginx/conf.d/taiga.conf

server {
    listen 80 default_server;
    server_name taiga.xxxxxxxxxx.com;
    return 301 https://$server_name$request_uri;
}

server {
    #listen 80 default_server;
    listen 443 default_server ssl;
    server_name taiga.xxxxxxxxxx.com;  #  See http://nginx.org/en/docs/http/server_names.html

    large_client_header_buffers 4 32k;
    client_max_body_size 50M;
    charset utf-8;

    access_log /home/taiga/logs/nginx.access.log;
    error_log /home/taiga/logs/nginx.error.log;

    # TLS: Configure your TLS following the best practices inside your company
    # Other configurations

    # Frontend
    location / {
        alias /home/taiga/taiga-front-dist/dist/;
        index index.html;
        try_files $uri $uri/ index.html =404;
    }

    # API
    location /api/ {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8001/api/;
        proxy_redirect off;
    }

    # Admin
    location /admin/ {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8001/admin/;
        proxy_redirect off;
    }

    # Static files
    location /static/ {
        alias /home/taiga/taiga-back/static/;
    }

    # Media
    location /_protected/ {
        internal;
        alias /home/taiga/taiga-back/media/;
        add_header Content-disposition "attachment";
    }

    # Unprotected section
    location /media/exports/ {
        alias /home/taiga/taiga-back/media/exports/;
        add_header Content-disposition "attachment";
    }

    location /media/ {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8003/;
        proxy_redirect off;
    }

    # Events
    location /events {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_connect_timeout 7d;
        proxy_send_timeout 7d;
        proxy_read_timeout 7d;
        proxy_pass http://127.0.0.1:8888/events;
    }

    # SSL
    #ssl on
    ssl_certificate /etc/letsencrypt/live/taiga.xxxxxxxxxx.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/taiga.xxxxxxxxxx.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
}

And yes you are right, the front say there is cors errors

Blocage du chargement du contenu mixte actif (mixed active content) « http://taiga.xxxxxxxxxxxxxxxxxx.com/api/v1/stats/discover 

Perhaps something to change in this file too?

taiga@ip-XXX-XX-XX-XXX:~/taiga-front-dist/dist$ cat conf.json 
{
    "api": "http://taiga.xxxxxxxxxxxx.com:8000/api/v1/",
    "eventsUrl": "wss://taiga.xxxxxxxxxxxx.com/events",
    "baseHref": "/",
    "eventsMaxMissedHeartbeats": 5,
    "eventsHeartbeatIntervalTime": 60000,
    "eventsReconnectTryInterval": 10000,
    "debug": false,
    "debugInfo": false,
    "defaultLanguage": "en",
    "themes": [
        "taiga"
    ],
    "defaultTheme": "taiga",
    "defaultLoginEnabled": true,
    "publicRegisterEnabled": true,
    "feedbackEnabled": true,
    "supportUrl": "https://community.taiga.io/",
    "privacyPolicyUrl": null,
    "termsOfServiceUrl": null,
    "maxUploadFileSize": null,
    "contribPlugins": [],
    "tagManager": {
        "accountId": null
    },
    "tribeHost": null,
    "enableAsanaImporter": false,
    "enableGithubImporter": false,
    "enableJiraImporter": false,
    "enableTrelloImporter": false,
    "gravatar": false,
    "rtlLanguages": [
        "ar",
        "fa",
        "he"
    ]
}

I have finally found, was this line the problem

    "api": "http://taiga.xxxxxxxxxxxx.com:8000/api/v1/",

To change to

    "api": "https://taiga.xxxxxxxxxxxx.com:8000/api/v1/",

Thanks for your help

1 Like