View Full Version : Putting my music folder on my web site.
l008com
02-24-2002, 07:38 PM
When I first switched to X, i kept everything on my home directory just like I did in X. I had an MP3 folder right on the root level. I though it would be cool to link this folder to my web page so you can click on a link and navigate through all my MP3's. I don't really consider this illegal since it is a personal site and so few people, if anyone, ever actually downloads anything. Well I've been using X for a while now and I finally decided to start using my home directory folders. So I moved all my Mp3's into my Music folder. Now I wanted to re-link to that folder from my web page. I know Finder aliases don't work. I thought I could make a link in the httpd.conf file, but that doesn't work either. So I went back to the terminal alias "ln -s" that I used to make the first one, but it doesn't work either! It gives a 403 error every time. I made sure the alias, the original, my home directory and even my users folder all have read access, but I still get a 403! What is going on?
usfgpm
03-04-2002, 01:26 AM
I did the exact thing that you described earlier tonight, but I was successful.
What I had:
All of my mp3s were in /Library/WebServer/Documents/music which made it great for publishing them on the web, but less convenient than using the Music directory in my home dir. I use the wonderful Andromeda (http://www.turnstyle.com/andromeda) script for broadcasting and sorting my mp3s.
What I wanted:
I wanted to keep all my mp3s in my /Users/myuser/Music/ dir instead of in my webserver root dir, but still be able to publish them on the web and use andromeda.
Here's what i did:
Step 1:
sudo ditto -rsrc /Library/WebServer/Documents/music/ /Users/myuser/Music/
This copied all of my mp3s from the music directory in my web server root dir to my Music folder.
Step 2:
After verifying that all of my files had copied into my Music folder, I used the Finder to navigate to /Library/WebServer/Documents/ and deleted the music dir where my mp3s were previously stored. You can do this using rm at the command line, but I prefer to have a nice GUI when I delete big/important stuff. :)
Step 3:
sudo ln -s /Users/myuser/Music/ /Library/WebServer/Documents/music
This creates the symbolic link. Since we are pointing to a directory and not a single file, a hard link will not work.
In OS 9 speak, this creates an alias of your Music folder in the root dir of your web server.
Step 4:
Control click on your /Users/myuser/Music/ dir and choose Show Info from the pop up menu. Once the Show Info box is open, choose Priveleges from the pop up menu.
Set your the priveleges for this dir to:
Owner: Read & Write
Group: Read only
Everyone: Read only
Then, click on Apply to all enclosed folders. Close the Show Info box.
That's it!
Now, if you go to http://127.0.0.1/music/ you should see the contents of your Music directory.
I hope this helps. Please be sure to post if you are successful or have more problems.
l008com
03-04-2002, 06:22 PM
Well I manually moved the files from where I had them to my Music folder, but then I did the symbolic link thing just like you , and set all the privileges right, but I still get a 403 forbidden error.
bluehz
03-05-2002, 06:47 AM
You might want to look into something called Netjuke (available at Sourceforge). It is a PHP-based LAN/WAN jukebox. Catalogs your MP3 collection using a MySQL db and offers a great GUI for accessing your collection. The developer is very active in its creation and is constantly adding new features. I highly recommend it.
http://netjuke.sourceforge.net/
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.