# Stylesheet not loading properly

**URL:** <https://community.taiga.io/t/stylesheet-not-loading-properly/2231>\
**Category:** Self hosted Taiga\
**Created:** [November 29, 2023, 11:33am UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231 "2023-11-29T11:33:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbr\_cefak](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mbr\_cefak](https://community.taiga.io/u/mbr_cefak)\
**Post date:** [November 29, 2023, 11:33am UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/1 "2023-11-29T11:33:26Z")

</div>

I have a similar Problem like in this Post described:

> [@Problems upgrading to 6.6.0](https://community.taiga.io/t/problems-upgrading-to-6-6-0/1299):
>
> I tried to upgrade to the new 6.6.0 from the previous version following themigration article ([Migrate to new docker settings (v 6.6.0+)](https://docs.taiga.io/upgrades-docker-migrate.html)) but ran into several problems. Once I put all the info in the .env and ran docker-compose, I got this error message: ERROR: The Compose file './docker-compose.yml' is invalid because: services.taiga-back.depends\_on contains an invalid type, it should be an array Which is kind of astonishing as this is the file I got from git. So I just tried and put all the…

I tried installing Taiga on my server but the stylesheet doesn’t seem to work properly. Any Taiga subpath looks like shown in the screenshot.  
 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/1/1c8e6e90cab901ca82a907f46baf8dcb052c1b02.png)  
Unfortunately, this post was not followed up.

I have installed Taiga-Docker like described in the setup guide. Instead of Nginx I used Apache for the webserver.

The browser console displays these errors:

- The stylesheet http://[IP]/taiga/v-1695217671916/styles/theme-taiga.css was not loaded because its MIME type, “text/html”, is not “text/css”.
- Uncaught SyntaxError: expected expression, got ‘\<’

I can’t figure out the reason for this issue and hope you can help me

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [November 29, 2023, 1:27pm UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/3 "2023-11-29T13:27:14Z")

</div>

Hi @mbr_cefak

Well, If the error was because the CSS was missing, you would see the content of the page without problems. But what you see is the html and the javascript does not finish executing correctly (you can see how the templates are not processed and the messages are not translated `{{ SOMEKEY | translate }}`)

Honestly, I think the problem may be in the modifications you made during the installation to `.env` or `docker-compose.yml` that are transferred to the json file of the taiga-front instance and cause it to not load correctly.

You can try to access to `http://[IP]/taiga//conf.json` to see if the file is formatted correctly.

---

<div class="post-metadata">

**Author:** ![mbr\_cefak](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mbr\_cefak](https://community.taiga.io/u/mbr_cefak)\
**Post date:** [November 30, 2023, 7:48am UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/4 "2023-11-30T07:48:53Z")

</div>

Hi david.barragan,  
thank you for your answer.

When I try to access the conf.json, I get to see the same content like in the screenshot I sent earlier with the same error messages shown in the browser console.  
In the .env file I have only modified the fields TAIGA\_DOMAIN and SUBPATH  
The modified part looks like this:  
TAIGA\_SCHEME=http  
TAIGA\_DOMAIN=localhost:9000  
SUBPATH=“/taiga”  
WEBSOCKETS\_SCHEME=wss

But since I can access taiga with the correct url, in my eyes this part shouldn’t be a Problem

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [November 30, 2023, 9:04am UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/5 "2023-11-30T09:04:53Z")

</div>

It’s strange that you can’t access that file (“conf.json”). That may be the problem. This file is essential for Taiga to initialize correctly.

The problem may then be in the Apache server.

---

<div class="post-metadata">

**Author:** ![mbr\_cefak](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mbr\_cefak](https://community.taiga.io/u/mbr_cefak)\
**Post date:** [November 30, 2023, 11:26am UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/6 "2023-11-30T11:26:36Z")

</div>

But if it was a problem with Apache, then it should work on localhost on the server, right?  
I just checked what would happen if I execute “curl localhost:9000/taiga/conf.json” in the server console. Unfortunately I get the exact same response like when accessing it with the servers ip-address and therefore the same bugged frontend when viewing it in a html viewer.

I also had the same issue when I first tried the setup process with nginx. I then switched to apache because I thought it might be a bug with nginx.

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [November 30, 2023, 12:46pm UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/7 "2023-11-30T12:46:01Z")

</div>

If you are going to use subpath, you cannot access it with localhost and you need to setup a nginx/apache to manage the access to the subpath properly.

Imagine I want to serve taiga at `http://bameda.com/taiga/` so my `.env` file should be like this:

```auto
# $ cat .env

# Taiga's URLs - Variables to define where Taiga should be served
TAIGA_SCHEME=http
TAIGA_DOMAIN=bameda.com
SUBPATH="/taiga"
WEBSOCKETS_SCHEME=ws

# (...)

```

And my nginx settings should be something like this:

```auto
# $ cat /etc/nginx/sites-available/bameda.com

server {
  server_name bameda.com;
  large_client_header_buffers 4 32k;
  client_max_body_size 50M;
  charset utf-8;

  access_log /var/log/nginx/bameda.com.access.log;
  error_log /var/log/nginx/bameda.com.error.log;

  # front 
  location /taiga/ {
    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_redirect off;
    proxy_pass http://localhost:9000/;
  }

  # events
  location /taiga/events {
      proxy_pass http://localhost:9000/events; # docker
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $host;
      proxy_connect_timeout 7d;
      proxy_send_timeout 7d;
      proxy_read_timeout 7d;
  }
}

```

With this, It should be work. You can change `bameda.com` with your public domain or public ip. An now you can obtain the config file with curl

```bash
$ curl bameda.com/taiga/conf.json
{
    "api": "http://bameda.com/taiga/api/v1/",
    "eventsUrl": "ws://bameda.com/taiga/events",
    "baseHref": "/taiga/",
    "eventsMaxMissedHeartbeats": 5,
    "eventsHeartbeatIntervalTime": 60000,
    "eventsReconnectTryInterval": 10000,
    "debug": false,
    "debugInfo": false,
    "defaultLanguage": "en",
    "themes": ["taiga"],
    "defaultTheme": "taiga",
    "defaultLoginEnabled": true,
    "publicRegisterEnabled": false,
    "feedbackEnabled": true,
    "supportUrl": "https://community.taiga.io/",
    "privacyPolicyUrl": null,
    "termsOfServiceUrl": null,
    "maxUploadFileSize": null,
    "contribPlugins": [],
    "gitHubClientId": "",
    "gitLabClientId": "",
    "gitLabUrl": "",
    "tagManager": { "accountId": null },
    "tribeHost": null,
    "enableAsanaImporter": false,
    "enableGithubImporter": false,
    "enableJiraImporter": false,
    "enableTrelloImporter": false,
    "gravatar": false,
    "rtlLanguages": ["fa"]
}

```

I hope this can help.

---

<div class="post-metadata">

**Author:** ![mbr\_cefak](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mbr\_cefak](https://community.taiga.io/u/mbr_cefak)\
**Post date:** [November 30, 2023, 1:58pm UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/8 "2023-11-30T13:58:28Z")

</div>

Thank you for your suggestions. Now I can at least access the conf.json file and it looks properly formatted. The only differences to the config you shared are the api and eventsURL values. In my case they look like this:  
api: “[http://localhost:9000/taiga/api/v1/](http://localhost:9000/taiga/api/v1/)”  
eventsUrl: “wss://localhost:9000/taiga/events”

What else could cause the error? Do you have any more ideas?

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [November 30, 2023, 2:19pm UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/9 "2023-11-30T14:19:52Z")

</div>

Yes, as I say, you have to change in `.env` `localhost:9000` with the external ip/domain of your server where your nginx/apache is listening.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/1/1d40562eacbd9b5511e7f38f18be4a140d5b7b41.png)

Then you have to restart the docker compose for the changes to take effect.

---

<div class="post-metadata">

**Author:** ![mbr\_cefak](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mbr\_cefak](https://community.taiga.io/u/mbr_cefak)\
**Post date:** [November 30, 2023, 2:49pm UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/10 "2023-11-30T14:49:46Z")

</div>

Sorry I misunderstood your previous answer  
I have changed the domain in the .env file and now taiga is working!  
Thanks a lot for your help, @david.barragan

---

<div class="post-metadata">

**Author:** ![david.barragan](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/david.barragan/32/293_2.png) [@david.barragan](https://community.taiga.io/u/david.barragan)\
**Post date:** [November 30, 2023, 5:21pm UTC](https://community.taiga.io/t/stylesheet-not-loading-properly/2231/11 "2023-11-30T17:21:57Z")

</div>

Great!!! \o/

You are welcome.
