Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gotify /stream does not work in reverse proxy of nginx #759

Open
4 tasks
kennysamuerto opened this issue Jan 18, 2025 · 3 comments
Open
4 tasks

Gotify /stream does not work in reverse proxy of nginx #759

kennysamuerto opened this issue Jan 18, 2025 · 3 comments
Labels
question Further information is requested

Comments

@kennysamuerto
Copy link

kennysamuerto commented Jan 18, 2025

Have you read the documentation?

  • [x ] Yes, but it does not include related information regarding my question.
  • Yes, but the steps described in the documentation do not work on my machine.
  • Yes, but I am having difficulty understanding it and want clarification.

You are setting up gotify in

  • Docker
  • [x ] Linux native platform
  • Windows native platform

Describe your problem

Hello, I am using Gotify on a Proxmox LXC, and everything works well. From other Proxmox instances, I can send notifications, and they arrive perfectly to Gotify. I have it exposed with an https URL through nginx proxy manager. I have WebSockets set as active. I can access Gotify without issues as I mentioned and work with it.

The problem arises because I need a plugin that connects to the API to also send notifications to PushOver.

This plugin gives me a 404 error when trying to connect to my url/stream, and when tested from the browser, the issue persists. I have tried configuring a location /stream in the advanced tab of my nginx proxy manager, without success:

location /stream {
    proxy_pass http://192.168.178.63/stream;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    
    # Importante: mantener el host original
    proxy_set_header Host $http_host;
    
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    
    proxy_buffering off;
    proxy_cache off;
    
    # No redirects
    proxy_redirect off;
    
    # Extended timeouts
    proxy_read_timeout 3600;
    proxy_send_timeout 3600;
}

I don't know what else to do, because there's no way to connect to /stream with nginx proxy manager over https. Any suggestions?

Thanks!

@kennysamuerto kennysamuerto added the question Further information is requested label Jan 18, 2025
@jmattheis
Copy link
Member

  • Does the gotify ui work without problems? (e.g. new messages appear without refreshing the page).
  • Could you post your gotify/server log?
  • What plugin do you use for the push over forwarding? Does it run on the same host as gotify?

@kennysamuerto
Copy link
Author

Does the gotify ui work without problems? (e.g. new messages appear without refreshing the page).

Yes, no problem. It works perfectly, I receive messages automatically, all messages are received well... everything is fine on that point.

Could you post your gotify/server log?

The truth is, I can't find where the log is; I can look for the path. However, I believe the problem arises more in some configuration of the nginx proxy manager rather than in Gotify, because without the domain (without going through nginx) the message works fine, but when going through nginx, that’s when it returns the 404. I suspect it must be some configuration, but I can't figure it out.

What plugin do you use for the push over forwarding? Does it run on the same host as gotify?

It is called Pushitfy, it can be found on GitHub. I run it in a docker outside the Gotify environment. Perhaps, if I ran it inside, I could call the internal IP and solve the issue of going through the nginx proxy, but out of curiosity, I would like to know why it happens only with Gotify. I have other exposed services, and I can access the folders if they exist. But in this case, I cannot access /stream, giving me a 404 from nginx.

Thank you for your help.

@jmattheis
Copy link
Member

Is the gotify ui you use also served by nginx? The ui also uses the /stream endpoint, so if one works the other should work as well. When you say that it does 404 what url are you using. e.g. you can access the ui on example.org and example.org/stream does 404?

Do you receive a 404 error page from nginx or gotify (gotify should return json on 404s)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants