Unable to reach Vikunja behind nginx

Does the request for the js and css assets arrive at the frontend container? (You should see it in the logs)

Does the request for the js and css assets arrive at the frontend container? (You should see it in the logs)

Honestly i cant give an accurate answer, i never checked that.

Edit: Seems i had a terminal window open with the logs from the container running, so i was able to scroll up. Here is what the frontend container had

"GET / HTTP/1.1" 200 3494 "-" "curl/7.64.0" "-"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:32 +0000] "GET /vikunja/ HTTP/1.1" 200 1674 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" "192.168.1.115"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:32 +0000] "GET /vikunja/assets/OpenSans-Italic_wght__c9a8fe68-5f21f1e7.woff2 HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:32 +0000] "GET /vikunja/assets/OpenSans_wght__54a65da5-b5ebdcd4.woff2 HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:32 +0000] "GET /vikunja/assets/Quicksand_wght__87bdcc7f-bf51d522.woff2 HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:32 +0000] "GET /vikunja/assets/index-7e79e645.js HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:32 +0000] "GET /vikunja/assets/index-20994d73.css HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:32 +0000] "GET /vikunja/manifest.webmanifest HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:32 +0000] "GET /vikunja/favicon.ico HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:56 +0000] "GET /vikunja/ HTTP/1.1" 200 1674 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:56 +0000] "GET /vikunja/assets/OpenSans-Italic_wght__c9a8fe68-5f21f1e7.woff2 HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:56 +0000] "GET /vikunja/assets/OpenSans_wght__54a65da5-b5ebdcd4.woff2 HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:56 +0000] "GET /vikunja/assets/Quicksand_wght__87bdcc7f-bf51d522.woff2 HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:56 +0000] "GET /vikunja/assets/index-7e79e645.js HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:56 +0000] "GET /vikunja/assets/index-20994d73.css HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:56 +0000] "GET /vikunja/images/icons/apple-touch-icon-180x180.png HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" "192.168.1.208"
frontend_1  | 172.27.0.2 - - [15/Nov/2023:14:15:56 +0000] "GET /vikunja/favicon.ico HTTP/1.1" 404 146 "https://server.local/vikunja/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0" "192.168.1.208"

I thought maybe it was my main SWAG proxy, so i switched over to Nginx Proxy Manager. Currently i have 2 services running on there successfully in subfolders.

Even with the different proxy, i just wasent able to get this to work. I have scrapped the subfolder approach and going back to the subdomain approach for vikunja.

I want it running vikunja.server.local. I am using the docker-compose file listed above except for 3 changes:

  1. No vikunja-proxy container
  2. Using the frontend image and not my frontend local directory.
  3. Env variables adjusted as needed for URLs

This is semi working, when i go the frontend over HTTP, i see the error that it cannot find the api.

The api is successfully running. I can sh into the frontend container and get a response from curl -X GET http://vikunja_api:3456/api/v1/info

Any suggestion what to do in this case?

Did you move the files into a vikunja/ subdirectory in the container or only changed the build path?

Only change the build path

I managed to get it working using the subdomain approach.

Right now NPMX → vikunja_proxy and is available at https://vikunja.server.local.

The only minor issue i have is that the API the frontend container is using is http://vikunja.server.local:port/api/v1 and not internal docker network ex: http://vikunja_api/api/v1.

But its in a working state with SSL, for now this is good enough for me.

Thanks for all the help

It will never work only through the docker internal network because the browser from which you’re accessing the frontend makes the requests to the api. Therefore, the browser needs to have access to the api.

That makes sense.

That means i only got SSL working for the frontend and the backend/API container still need to be secured.

1 Like