dir2cast icon indicating copy to clipboard operation
dir2cast copied to clipboard

Use MP3s under public_html in root?

Open thetwopct opened this issue 7 years ago • 1 comments

I have about 1TB of MP3s. Due to leechers, I don't want them accessible via the web, so I serve downloads of files via a PHP proxy file.

I want to offer a podcast and I am pretty sure dir2cast can help in my scenario, but I just cannot get it to work.

Server layout: Where my website is /home/company/public_html/ Where dir2cast sits /home/company/public_html/podcast/ Where my mp3 files are /home/company/mp3s/

My settings in dir2cast.ini are:

MP3_DIR = /home/company/mp3s/
;MP3_BASE
;MP3_URL

The files are found and recursively so throughout the directories I have (brilliant) but links to the files in the XML come out as: file:///home/company/mp3s/show1.mp3

Any help would be blinding!

Cheers

thetwopct avatar May 06 '18 11:05 thetwopct

Heya,

If you peek at the source code, file:// is the last resort when it couldn't work out the right URL from a combination of HTTP_HOST and DOCUMENT_ROOT CGI variables.

You can also just specify your "web root" by setting MP3_URL, which in your configuration you've commented out. Just set that (as well as MP3_DIR) and you should be set.

ben-xo avatar May 15 '18 08:05 ben-xo