I have two machines with ip1 and ip2. They are all internal IP.
I do not own a domain, peertube is so far for internal use.
How could I set nginx reserve proxy on machine with ip2 for peertube on machine with ip1?
webserver
and certbot
sessions are commented out in docker-compose.yml
I retrieved nginx/peertube, updated it and added it in nginx.conf:
- replaced $host; with ip1:port
- set proxy_pass to http://ip1:port
- removed listener 80 part
- removed http2/ssl part
- removed performance optional part
Can anyone help? now the video is always loading and failing with error: Cannot get sha256 segments
the /static/streaming-playlists/hls/
URI is always requested with ip1 instead of ip2
2023-11-17 17:55:59 [192.168.12.175:9000] 2023-11-17 09:55:59.303 info: 192.168.65.1 - - [17/Nov/2023:09:55:59 +0000] "POST /api/v1/metrics/playback HTTP/1.0" 204 - "http://192.168.11.19:9000/w/igoyeDvhnQCYUcS3gmvAiE" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
2023-11-17 17:56:02 [192.168.12.175:9000] 2023-11-17 09:56:02.429 error: Client log: Cannot get sha256 segments {
2023-11-17 17:56:02 "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
2023-11-17 17:56:02 "stackTrace": "Failed to fetch\nTypeError: Failed to fetch\n at http://192.168.11.19:9000/client/en-US/polyfills.8a8facddc202dac1.js:1:48773\n at P.<computed> (http://192.168.11.19:9000/client/en-US/polyfills.8a8facddc202dac1.js:1:42686)\n at mn (http://192.168.11.19:9000/client/en-US/1464.0ef497cdc41df7ae.js:1:156089)\n at Ft (http://192.168.11.19:9000/client/en-US/1464.0ef497cdc41df7ae.js:1:155028)\n at yn.getP2PMediaLoaderOptions (http://192.168.11.19:9000/client/en-US/1464.0ef497cdc41df7ae.js:1:158176)\n at http://192.168.11.19:9000/client/en-US/1464.0ef497cdc41df7ae.js:1:156904\n at Generator.next (<anonymous>)\n at e (http://192.168.11.19:9000/client/en-US/main.bd93603f4b080a2b.js:3:689510)\n at c (http://192.168.11.19:9000/client/en-US/main.bd93603f4b080a2b.js:3:689712)\n at http://192.168.11.19:9000/client/en-US/main.bd93603f4b080a2b.js:3:689771",
2023-11-17 17:56:02 "url": "http://192.168.11.19:9000/w/igoyeDvhnQCYUcS3gmvAiE"
2023-11-17 17:56:02 }
2023-11-17 17:56:02 [192.168.12.175:9000] 2023-11-17 09:56:02.429 info: 192.168.65.1 - - [17/Nov/2023:09:56:02 +0000] "POST /api/v1/server/logs/client HTTP/1.0" 204 - "http://192.168.11.19:9000/w/igoyeDvhnQCYUcS3gmvAiE" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-11-17 17:56:02 [192.168.12.175:9000] 2023-11-17 09:56:02.454 error: Client log: HLS.js error: networkError - fatal: true - manifestLoadError {
2023-11-17 17:56:02 "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
2023-11-17 17:56:02 "url": "http://192.168.11.19:9000/w/igoyeDvhnQCYUcS3gmvAiE"
2023-11-17 17:56:02 }
pls note that the request is successful when I replace ip1 with ip2
e.g. ip1 will fail
« http://192.168.12.175:9000/static/streaming-playlists/hls/8bd16a0d-2e67-4ca3-bc34-310d35572f70/7a622dbd-bb06-43c1-98f7-925cc6c31acb-segments-sha256.json »
but ip2 succeeds
« http://192.168.11.19:9000/static/streaming-playlists/hls/8bd16a0d-2e67-4ca3-bc34-310d35572f70/7a622dbd-bb06-43c1-98f7-925cc6c31acb-segments-sha256.json »
I belive the proxy is correct?