Jump to content

Emby behind reverse proxy, android & kodi connection refused


Recommended Posts

Posted

Hi,

I am struggling with emby behind a reverse proxy with apache2 on debian.

I used the configuration in this topic: https://emby.media/community/index.php?/topic/40461-emby-server-with-apache-reverse-proxy/

here is my emby.conf located in /etc/apache2/site-available/ :

<IfModule mod_ssl.c>
<VirtualHost *:80>
        ServerName nas-emby.myvnc.com
        ServerAdmin mon@email.fr

	RewriteEngine on
	RewriteCond %{SERVER_NAME} =nas-emby.myvnc.com
	RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>

<VirtualHost *:443>
	ServerName nas-emby.myvnc.com
	ServerAdmin mon@email.fr

	<proxy *>
	AddDefaultCharset off
	Order Allow,Deny
	Allow from all
	</proxy>

	ProxyRequests     Off
	ProxyPreserveHost On

	ProxyPass "/embywebsocket" "ws://127.0.0.1:8096/embywebsocket"
	ProxyPassReverse "/embywebsocket" "ws://127.0.0.1:8096/embywebsocket"

	ProxyPass "/" "http://127.0.0.1:8096/"
	ProxyPassReverse "/" "http://127.0.0.1:8096/"

	Include /etc/letsencrypt/options-ssl-apache.conf
	SSLCertificateFile /etc/letsencrypt/live/nas-emby.myvnc.com/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/nas-emby.myvnc.com/privkey.pem
</VirtualHost>
</IfModule>

I can connect with any web browser outside/inside my local network without any errors. But with the android app i have the message "Invalid login/password"

In emby's log i have : Error HttpServer: Access token is invalid or expired.

Kodi and Android app works fine in my local network and if i don't disconnect from android app, out of my local network it still work.

 

I don't know what's wrong in my apache2 or why i have this error.

Someone could help ?

Thanks

 

embyserver.txt

mastrmind11
Posted

sounds like a cert issue.

Posted

Thanks for your replies

For the certificates I use certbot for 3 domain name, one for nextcloud, one for transmission and one for emby. My domain name for emby and transmission are cname redirecting on nextcloud.

I just used this command: certbot renew --dry-run

just to be shure they are updated and no error returned. How can i provide more informations about it ?

 

I tried to connect using https://app.emby.media but it didn't work, it can't find my server.

Posted
2 hours ago, Kyuss said:

Thanks for your replies

For the certificates I use certbot for 3 domain name, one for nextcloud, one for transmission and one for emby. My domain name for emby and transmission are cname redirecting on nextcloud.

I just used this command: certbot renew --dry-run

just to be shure they are updated and no error returned. How can i provide more informations about it ?

 

I tried to connect using https://app.emby.media but it didn't work, it can't find my server.

What do you mean by "can't find my server" ? You're right, the web app can't find your server because web apps aren't able to do that. You need to connect to your server by entering connection info.

Posted

I go to https://app.emby.media/ then i use my Emby Connect to log on, then it ask me to add a new server, i enter my server information ( i leave port number blank) then:

image.png.fd523e0ef99423489735bd5fea341bd9.png

 

I tried to go in emby server settings on my profil, i added to my profil my emby connect username. After doing that my server appear in the connection screen (maybe because i already added the server ?) but same error.

The server is online. i don't see any error in the logs about https://app.emby.media/

embyserver.txt

Posted
2 minutes ago, Kyuss said:

I go to https://app.emby.media/ then i use my Emby Connect to log on, then it ask me to add a new server, i enter my server information ( i leave port number blank) then:

image.png.fd523e0ef99423489735bd5fea341bd9.png

 

I tried to go in emby server settings on my profil, i added to my profil my emby connect username. After doing that my server appear in the connection screen (maybe because i already added the server ?) but same error.

The server is online. i don't see any error in the logs about https://app.emby.media/

embyserver.txt 1.24 MB · 0 downloads

Have you setup https with your server? If not then you may need to use http://app.emby.media instead

Posted

Same error, i'm doing it on my local network.

Posted

Most likely the browser is rejecting your certificate. Where did the SSL certificate come from?

Posted (edited)

The only certificate I have is from let's encrypt using certbot, in my apache2 conf at the end of it, you have the path to the certificate.

I didn't convert it to a PKCS #12 and didn't added the path in emby network configuration.

my domain name is from no-ip 

 

Edit: 

when i naviguate to : nas-emby.myvnc.com

i copy paste the url after my connection and i have: https://nas-emby.myvnc.com/web/index.html#!/home

it use https

Edited by Kyuss
Posted

Ok sorry i found my mistake...

i was using nas-emby.myvnc.com instead of https://nas-emby.myvnc.com

It work on android and I installed kodi on my laptop and it work too.

 

Sorry for the unnecessary topic.

Posted

Thanks for the feedback.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...