Code Monkey home page Code Monkey logo

Comments (11)

jmattheis avatar jmattheis commented on May 22, 2024 1

It's probably not a problem with the server ssl. It's a problem with the database connection.

Could you try to add sslmode=disable to your connection string

connection: host=localhost port=5432 user=gotify dbname=gotify password=xxx sslmode=disable

See https://stackoverflow.com/questions/21959148/ssl-is-not-enabled-on-the-server

from server.

doronbehar avatar doronbehar commented on May 22, 2024

That worked, my server is up and running, thanks. This flag is not documented right?

Additionally, Why is there the Failed to find configuration config.yml message when it does exist in it's default location /etc/gotify?

from server.

jmattheis avatar jmattheis commented on May 22, 2024

Yeah, I'll add this flag to the readme. The config library Gotify uses, outputs this message for every location where it couldn't find a config file, but yeah it is a little missleading and should be fixed.

from server.

doronbehar avatar doronbehar commented on May 22, 2024

Thanks for your help, I've one more question please: I'm having trouble making use of my server because from some reason I can't log in with the default username and password.

I've tried using both the PostgreSQL server and both the SQLite file and I can see a user is created with a hashed password but the login just fails. I've tried to delete the SQLite file and rerun the server and I've tried to drop the gotify table in PostgreSQL's shell and recreate it and rerun gotify afterwards but still the default username and password don't work.

Perhaps it could be because I run it behind a reversed proxy connection Apache server?

from server.

jmattheis avatar jmattheis commented on May 22, 2024

@doronbehar could you try connecting to Gotify without the reverse proxy? Is your proxy pointing to a subdomain?

from server.

doronbehar avatar doronbehar commented on May 22, 2024

Weirdly, the authentication works fine when I use the same credentials without the proxy and directly to port 8001.

My setup is as follows:

I run gotify without it's builtin SSL support on port 8001 - as seen in my config.yml. I have a <VirtualHost> section in my httpd.conf:

<VirtualHost _default_:80>
    ServerName gotify.doronbehar.com
    Redirect permanent / https://gotify.doronbehar.com/
</VirtualHost>

<VirtualHost _default_:443>
    ServerName gotify.doronbehar.com
    <Proxy *>
        AuthType Basic
        AuthName "Protected site"
        # Just for extra protection
        AuthUserFile /etc/gotify/.htpasswd
        Require valid-user
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPassMatch ^/.well-known/acme-challenge/ !
    ProxyPass "/" "http://localhost:8001/" connectiontimeout=5 timeout=30 keepalive=on
    ProxyPassReverse "/" "http://localhost:8001/"
    ErrorLog /var/log/httpd/gotify.info-error_log
    CustomLog /var/log/httpd/gotify.info-access_log common
    SSLEngine on
    BrowserMatch "MSIE [2-5]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
    <FilesMatch "\.(cgi|shtml|phtml|php)$">
        SSLOptions +StdEnvVars
    </FilesMatch>
    SSLCertificateFile /etc/letsencrypt/live/doronbehar.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/doronbehar.com/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

EDIT

BTW I've just checked on the login with the app and that works just fine. I think my problem was that basic authentication for the server. So problem solved.

Thanks anyway.

from server.

jmattheis avatar jmattheis commented on May 22, 2024

@doronbehar Yeah, it's probably the fault of the added basic auth for the proxy, Gotify also uses basic auth for authentication, so maybe it's not that easy to have both.

from server.

doronbehar avatar doronbehar commented on May 22, 2024

Then besides the config.yml message I see this issue as closed, thanks again for your help I hope I'll find Gotify useful for me.

from server.

jmattheis avatar jmattheis commented on May 22, 2024

I created #93 for missleading error message. Also I'll document the sslmode flag. Thanks for trying out Gotify (:.

from server.

nishanth1301 avatar nishanth1301 commented on May 22, 2024

Started Listening for plain HTTP connection on :80
2023/04/25 08:59:10 Could not listen on :80 listen tcp :80: bind: address already in use
got error while running in niginx

from server.

jmattheis avatar jmattheis commented on May 22, 2024

@nishanth1301 it's unrelated to this ticket, please create a new ticket. Gotify tries to start a http server on port 80, but there is already something running on that port.

from server.

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.