Open TTLucian opened 3 years ago
Should work. Maybe an issue because of a combination with https certs?
Certs are valid. I use same ngnix and cert for Radarr, emby, jackett, bazarr, qbittorrent, kodi (domain.com/location). All work fine. With web_root set I can't access Medusa at all... Not through nginx and not even locally (with http://ip:port). After I remove the web_root, I can access it only locally
As written in the notes, you need to restart Medusa after you change the web_root.
But of course I restarted Medusa. I've stated this in the OP and you can see in the logs. This happens after restart.
For me it works over proxy (https://xxxx.org/medusa/) but locally I get
Traceback (most recent call last):
File "C:\Miki\Medusa\ext\tornado\web.py", line 1681, in _execute
result = self.prepare()
File "C:\Miki\Medusa\ext\tornado\web.py", line 2430, in prepare
raise HTTPError(self._status_code)
tornado.web.HTTPError: HTTP 404: Not Found
Medusa Info: | Branch: master Commit: db102f3561204d388c3f4cbf6e89c79282ecd12f Version: 0.5.14 Database: 44.18 |
---|---|
Python Version: | 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] |
SSL Version: | OpenSSL 1.1.1g 21 Apr 2020 |
OS: | Windows-10-10.0.18362-SP0 |
Locale: | hr_HR.cp1250 |
Timezone: | Central European Daylight Time |
That is because when adding the web_root prefix (e.g. "/medusa") it changes the URL in the base html files to point to the hostname+prefix. See the initial get content, something like:
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#333333">
<title>Medusa</title>
<base href="https://www.xxxxxxx.org:443/medusa">
So when trying to access locally it yield (e.g. 192.168.1.42):
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#333333">
<title>Medusa</title>
<base href="http://192.168.1.42:8081/medusa/">
The trick (from what I gathered) is that the embedded server (Tornado) only listen on that prefix, so you could try to simply type the local url suffixed by the web root? (e.g. with http://ip:port/medusa) ?
In anycase that setting worked for me: medusa (config.ini):
web_root = /medusa
handle_reverse_proxy = 1
nginx:
location /medusa/ {
proxy_pass http://127.0.0.1:8081/medusa/;
proxy_set_header Host $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-Host $host:443;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto $scheme;
# Websocket
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
Fresh installation of Medusa Following the wiki for reverse proxy setup, as soon as I set web_root = /medusa and restart, I lose all access to medusa webui
error in browser:
Traceback (most recent call last): File "C:\Data\Medusa\Medusa\ext\tornado\web.py", line 1569, in _execute result = self.prepare() File "C:\Data\Medusa\Medusa\ext\tornado\web.py", line 2322, in prepare raise HTTPError(self._status_code) tornado.web.HTTPError: HTTP 404: Not Found
Log is spamed with:
WARNING TORNADO :: [698ca1d] 404 GET /home/is_alive/ (192.168.1.80) 1.94ms
Accessing through nginx shows:
Loading… If this is taking too long, click here to show the page.
Medusa Info: | Branch: masterCommit: 698ca1db9903a9f716d9ed1910972cbf70ea50e8Version: 0.5.3Database: 44.17 Python Version: | 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] SSL Version: | OpenSSL 1.1.0j 20 Nov 2018 OS: | Windows-10-10.0.19041-SP0 Locale: | en_US.cp1252
Debug logs: