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
Cannot get webserver to run properly #1
Comments
First check if the webserver user - most likely
If that part works the rest should be easy. Since you're using nginx you can just take the snippet from the last section of the README, adjust the
So, from start to finish:
Have a look at the contents of your |
Ok. Thanks for the quick reply. I installed globally via I can now create feeds and the corresponding folders are created. Files are downloaded too. But when i click on the feed link, it just load an empty .html. The link is As you may noticed, i am not an expert in web-dev (😅), but maybe you have an idea what is going on here. |
Shows can not be top-level domains since they always have the manager below them so that should not be the problem. It sounds more as if the PHP code in .index.php is not executed on load, is there anything interesting in the php-fpm or nginx error logs? |
Feed manager looks normal. I can add/delete/configure/refresh shows and set parameters. Here is the error log from nginx while i am trying to access the show.
|
OK, I see the problem - it lies in the template for the feed |
https://github.com/Yetangitu/Spodcast/releases/tag/v0.3.2 The only significant change is to the index feed template which was missing two --- a/spodcast/feedgenerator.py
+++ b/spodcast/feedgenerator.py
@@@ -4,8 -4,8 +4,8 @@@ RSS_FEED_SHOW_INDEX = 'index
def RSS_FEED_CODE():
return r'''<?php
--SHOW_INDEX = "''' + RSS_FEED_SHOW_INDEX + r'''";
--INFO = "''' + RSS_FEED_INFO_EXTENSION + r'''";
++const SHOW_INDEX = "''' + RSS_FEED_SHOW_INDEX + r'''";
++const INFO = "''' + RSS_FEED_INFO_EXTENSION + r'''";
header("Content-type: text/xml");
$feed_name = "Spodcast autofeed";
$feed_description = "Spodcast autofeed"; |
Now it is working, kind off... The rss-feed is loading fine, but each episode is served as a Overcast, the podcast app i normally use, gives me an error on adding the podcast. At the moment i do not know why, but i will try to investigate. Thanks for you help so far. |
I ll change that hard-coded |
Now fixed in master, if you want to apply the fix yourself: --- a/spodcast/feedgenerator.py
+++ b/spodcast/feedgenerator.py
@@ -6,10 +6,11 @@ def RSS_FEED_CODE():
return r'''<?php
const SHOW_INDEX = "''' + RSS_FEED_SHOW_INDEX + r'''";
const INFO = "''' + RSS_FEED_INFO_EXTENSION + r'''";
+$PROTOCOL + ($HTTPS) ? "https://" : "http://";
header("Content-type: text/xml");
$feed_name = "Spodcast autofeed";
$feed_description = "Spodcast autofeed";
-$base_url = strtok('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '?');
+$base_url = strtok($PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '?');
$feed_logo = "$base_url/.image.jpg";
$feed_link = $base_url;
$allowed_extensions = array('mp4','m4a','aac','mp3','ogg'); |
Ok, i had no luck in changing the template. I think Overcast can not access the local network due to iOS security. I can not grant local access unless the app asks me to. I dig into that and maybe contact the developer. Currently i have no VPS to test this suspicion, but maybe you or somebody else has a non-local instance to do a short test. |
Just install 0.3.3, it works without needing to meddle with the template. As to testing on iOS that'd be hard for me given the lack of apples other than those from trees. I can rig up a temporary instance for you to test if that helps. Send me some contact details on s p o d c a s t followed by the at symbol followed by unter n e t, dot, org and I'll reply with a temporary domain. Do your testing and let me know if it works. I use letsencrypt certificates, these should work more or less everywhere. I'll remove the domain when you're done testing. |
Adding a deploy to Heroku button https://devcenter.heroku.com/articles/heroku-button or a Dockerfile would be super helpful. |
Here are my findings so far: your testing instance works in overcast. So i did some more testing on my local instance and got it (kind of) working: I accessed the Pi via its local IP (not hostname), then copied the source-code of a feed to an .xml file and posted this file on my github. Then i added the show via the direct link of the file on github to overcast. With this method overcast asked me to grant local access and downloaded the episodes from the local Pi. Not working when:
When overcast is timing out i do not see a hit in the nginx logs. So maybe as a workaround i have to write a script that generates the |
[edit: irrelevant, see below for the real solution] |
This is how the traffic related to
Notice that the traffic does not come from your device, it comes from the Overcast mothership:
Only after crawling the feed from the central authority does Overcast-the-app come into action:
...followed by Overcast central, again:
...upon which the app on your device seems to be given permission by the Overlords to access the feed:
In other words, that Overcast app does not directly accept podcast links like, say, Antennapod on Android or just about any other real podcast app does. It submits "foreign" podcast links to some centralised service which then tells the app what to do with them in some way. To paraphrase some old greybeard: here's a nickel, son. Get yourself a real podcast app. |
FYI, Spodcast is now available on PyPi, just run |
Feel like submitting a PR for one of those? I don't use either so I'd have to create a build environment for Docker and get involved with Heroku. Running my own services on my own hardware on my own connections this is not that relevant for me. |
Thanks for providing the logs. Seems like you got to the root. As Overcast is an awesome app i just wrote a script, which uploads the |
...until Overcast.inc starts to wonder what that strange feed coming from github is. I have no idea whether they police the feeds gathered by its users so with a bit of luck this will keep on working. |
I'll close this issue seeing as how Spodcast works as intended. |
This tool is awesome, thank you. But i am having a hard setting it up properly.
I got the Web-Interface running, but i cannot add podcasts through it (credentials set, no error message). When i add a podcast through the CLI the podcast shows up on the main page, but the served .index for the podcast is empty.
Can you write a small tutorial how to set up the webserver or point me in the right direction?
I am using a RPi 4 with 64-bit bullseye and nginx, php-fpm.
The text was updated successfully, but these errors were encountered: