0

At the moment I have a apache web server and in this web server I have a "test.html" file. this file streams an audio file from the following directory. "audio/monkey.mp3". (full path /var/www/html/work/audio/monkey.mp3) this works fine at the moment.

ideally I would like to access another audio file in another directory, which is outside the webserver directory. for exmaple /var/spool/music/.

i tried pointing the "test.html" file to there but it didnt work. anything out side /var/www/html/ will not work.

1
  • Correct me if I'm wrong.. It is not ideal to point, change or modify outside the /html/www if the server is facing public internet as this may cause security threats. Even if it is an internal server, it is still the same.
    – AzkerM
    Oct 22, 2015 at 17:42

2 Answers 2

3

Apache is limited to serving files within its document root. You could change the document root (probably not the best idea in this case). You could also create a symbolic link to the directory:

ln -s /var/spool/music /var/www/music

You will also need to make sure that apache has +r privileges for the files in question and +x for the directory. One way to ensure that is to change the group of the files/folder in question to www-data.

0

I will give this a go. Is there any security risks if I use a symbolic link? the end goal is to let users be able to stream music on a web gui.

shanika

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .