Comments (15)
Hey @monsieurpouet
is there any gotify/server log when you try to connect to gotify/server through the apache2 proxy?
This serverfault answer suggests adding Keepalive=On
to the ProxyPass parameters could you try this?
from server.
I'm sorry, I had forgot some logs.
My Gotify Logs:
Starting Gotify version 1.2.1@2018-12-12-21:08:19
Started Listening on port 443
Started Listening on port 80
http: TLS handshake error from 172.24.0.1:34828: tls: first record does not look like a TLS handshake
http: TLS handshake error from 172.24.0.1:34832: tls: first record does not look like a TLS handshake
http: TLS handshake error from 172.24.0.1:34856: tls: first record does not look like a TLS handshake
http: TLS handshake error from 172.24.0.1:34860: tls: first record does not look like a TLS handshake
http: TLS handshake error from 172.24.0.1:34866: tls: first record does not look like a TLS handshake
http: TLS handshake error from 172.24.0.1:39092: tls: first record does not look like a TLS handshake
http: TLS handshake error from 172.24.0.1:39288: tls: first record does not look like a TLS handshake
http: TLS handshake error from 172.24.0.1:41954: tls: first record does not look like a TLS handshake
http: TLS handshake error from 172.24.0.1:41958: tls: first record does not look like a TLS handshake
I put a KeepAlive directive in my conf file. But, I've same error.
from server.
Looks like Apache send a plain HTTP request to the gotify TLS endpoint. Make sure you have set GOTIFY_SERVER_PORT
to 2083
as shown on you apache configuration and set GOTIFY_SERVER_SSL_ENABLED=false
It would be good to post both your gotify config and apache config so that we can have a better overview of your configuration:)
from server.
Ok ok ! It'll be more simple :)
version: '3'
services:
gotify:
image: gotify/server
ports:
- '127.0.0.1:2083:443'
volumes:
- /etc/gotify:/app/data
environment:
- GOTIFY_SERVER_PORT=2083
- GOTIFY_SERVER_SSL_ENABLED=false
- GOTIFY_SERVER_SSL_REDIRECTTOHTTPS=true
- GOTIFY_SERVER_SSL_PORT=443
- GOTIFY_SERVER_SSL_LETSENCRYPT_ENABLED=true
- GOTIFY_SERVER_SSL_LETSENCRYPT_ACCEPTTOS=false
- GOTIFY_SERVER_SSL_LETSENCRYPT_CACHE=certs
- GOTIFY_SERVER_SSL_LETSENCRYPT_HOSTS=- push.blabla.fr
- GOTIFY_DATABASE_DIALECT=sqlite3
- GOTIFY_DATABASE_CONNECTION=gotify.db
- GOTIFY_DEFAULTUSER_NAME=admin
- GOTIFY_DEFAULTUSER_PASS=pass
- GOTIFY_UPLOADEDIMAGESDIR=images
<VirtualHost *:80>
ServerName push.blabla.fr
Redirect / https://push.blabla.fr/
ServerSignature Off
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =push.blabla.fr
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName push.blabla.fr
SSLEngine On
ProxyPass "/" http://127.0.0.1:2083/ retry=0 timeout=5
ProxyPassReverse / http://127.0.0.1:2083/
ServerSignature Off
Keepalive On
CustomLog /var/log/apache2/push_access.log combined
ErrorLog /var/log/apache2/push_error.log
Include /etc/letsencrypt/options-ssl-apache.conf
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/push.blabla.fr/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/push.blabla.fr/privkey.pem
</VirtualHost>
Thanks you for your help !
from server.
The ports
should be 127.0.0.1:2083:2083
, as you should be connecting to port 2083
instead of 443
in your container.
Your docker-compose in whole should be:
version: '3'
services:
gotify:
image: gotify/server
ports:
- '127.0.0.1:2083:2083'
volumes:
- /etc/gotify:/app/data
environment:
- GOTIFY_SERVER_PORT=2083
- GOTIFY_SERVER_SSL_ENABLED=false
- GOTIFY_SERVER_SSL_REDIRECTTOHTTPS=true
- GOTIFY_SERVER_SSL_PORT=443
- GOTIFY_SERVER_SSL_LETSENCRYPT_ENABLED=true
- GOTIFY_SERVER_SSL_LETSENCRYPT_ACCEPTTOS=false
- GOTIFY_SERVER_SSL_LETSENCRYPT_CACHE=certs
- GOTIFY_SERVER_SSL_LETSENCRYPT_HOSTS=- push.blabla.fr
- GOTIFY_DATABASE_DIALECT=sqlite3
- GOTIFY_DATABASE_CONNECTION=gotify.db
- GOTIFY_DEFAULTUSER_NAME=admin
- GOTIFY_DEFAULTUSER_PASS=pass
- GOTIFY_UPLOADEDIMAGESDIR=images
from server.
Starting Gotify version 1.2.1@2018-12-12-21:08:19
Started Listening on port 443
Started Listening on port 80
Also, according to your log, gotify
is not listening on 2083
as your specified in environments
. Maybe is there a config.yml
file on /etc/gotify
in your host system present that overrides the configuration?
from server.
I wasn't far away ^^
It works now with your correction :D I'll test that with Android now (maybe, i'll be back :p)
The update works just with docker pull ?
from server.
Glad to hear you are up and running:)
Yeah it should work just by updating the container:)
from server.
Android app work fine ! Bit i've some error "Bad request" in the app, and I have to refresh in the app to show the messages like my mail ahah :p
from server.
Does websocket work well on WebUi? You might need to tell Apache to proxy websocket requests too. See https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html
from server.
Sorry I'm not very familiar with Apache but according to the documentation I guess this is what you need:
ProxyPass "/stream" "ws://127.0.0.1:2083/"
from server.
And the push doesn't work now :/
Maybe, I need 2 lines about ProxyPass. One with stream and One with /
from server.
Yeah you need both lines, one for proxying HTTP and another for websocket.
from server.
Everything work great now !
Thanks you. I've make a pull request for the configuration for apache2 =)
(my first pull request.. i assume^^)
from server.
In your configuration, there is a silent misconfiguration. These three lines is a silent misconfiguration. This means adding it to your system will not change any system behavior.
<VirtualHost *:80>
...
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =push.blabla.fr
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
...
</VirtualHost>
"RewriteEngine Off" is introduced by Apache to explicitly disable all "RewriteRule" and "RewriteCond".
That is to say, if you include multiple "RewriteRule" and "RewriteCond" parameters in your configuration, then instead of commenting them all, you can explicitly set “RewriteEngine Off” to disable all "RewriteRule".
More importantly, the default value of “RewriteEngine" is already an "off", so adding “RewriteEngine off" is quite unnecessary and it may cause confusion to users.
Related Apache source code snippet:
run_rewritemap_programs(server_rec *s , apr_pool_t *p){
if (conf->state == ENGINE_DISABLED) { // usage of "RewriteEngine"
return APR_SUCCESS; // early return
rewritemap_program(...); // usage of "RewriteRule"
}
from server.
Related Issues (20)
- [Request] Clear Messages After 30 Days HOT 1
- Update Message HOT 2
- Cant use emoji with sqlite3 HOT 3
- 403 when passing Origin header with Environment config HOT 7
- Fresh install on CasaOS (via BigBearCasaOS) HOT 2
- Clickable notification title when click.url is set HOT 1
- Removal of disabled flag on Refresh button
- Can't get Apache 2.4.38 proxy with sub path to upgrade to websocket HOT 13
- Cannot login behind Traefik, but ip:port works fine HOT 4
- Unable to Login with default credentials HOT 4
- Assistance with json format for multiple message extras HOT 3
- Accept priority as string HOT 6
- Is it Possible to Only Use a URL to Forward Messages? HOT 2
- 401 when logging in via Caddy, but ip:port works HOT 8
- Use gotify as 2FA with messages extras HOT 1
- Configure app graylog to use gotify for notifcations HOT 4
- Filter by Message HOT 1
- Websocket stream per application HOT 1
- Support for X-Forwarded-Prefix HOT 2
- Android App Notification: Could not connect / Bad Request HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.