Coder Social home page Coder Social logo

Working with reverse proxy about kimai2 HOT 3 CLOSED

tobybatch avatar tobybatch commented on July 30, 2024
Working with reverse proxy

from kimai2.

Comments (3)

noblevirk avatar noblevirk commented on July 30, 2024

Update 12/18
The log file as you can see is generating errors, because the docker app couldn't find the database. I have that removed now, I am successfully able to connect to database and verify it using bin/console as follows:

root@eab63b257b5f:/opt/kimai# ./bin/console doctrine:database:create

Could not create database kimai for connection named default An exception occurred while executing 'CREATE DATABASE kimai': SQLSTATE[HY000]: General error: 1007 Can't create database 'kimai'; database exists

I think something in the Symfony framework is causing reverse proxy to break. I tried adding the "TRUSTED_PROXIES" in the docker-compose file to my reverse proxy server's address (which is docker-generated) but due to some permissions issue i get:

/startup.sh: line 20: /opt/kimai/,env: Permission denied
/startup.sh: line 23: /opt/kimai/,env: Permission denied

I logged in the docker-container for the app, by docker exec -u 0 -it time-app bash and saw that a new file with ,env is created and .env is not updated. So i updated the /startup.sh now the .env contains TRUSTED_PROXIES. I also found an error in line 23 of startup.sh, where it wasn't appending the TRUSTED_HOST variable.

Unfortunately, after all that I still can't access it from outside through the reverse proxy :(

from kimai2.

tobybatch avatar tobybatch commented on July 30, 2024

@noblevirk I'm not sure if this will fix your issue but you have found a bug related to the startup.sh

Weirdly I'm using this setup behind a nginx reverse proxy for our complany and didn't hit this problem but anyway I have typo'd the line that sets the trusted proxy, it should read .env not ,env.

Master has been fixed and travis has built it, so can you pull master (or prod image) and try again please.

from kimai2.

noblevirk avatar noblevirk commented on July 30, 2024

@tobybatch

I figured out what was causing it, I was trying to connect to kimai at port 8000 instead of 8080.

Thank you for your support, please close this issue.

from kimai2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.