image
image

Go Back   macosx.com > Mac Help Forums > HOWTO & FAQs

Reply
 
Thread Tools
  #1  
Old September 4th, 2002, 10:33 AM
solrac's Avatar
Quad 6 ghz G5 Tower
 
Join Date: Oct 2000
Location: LA, CA
Posts: 840
Thanks: 0
Thanked 0 Times in 0 Posts
solrac is on a distinguished road
modifying the personal web sharing

here i posted this on macosxhints.com but i don't know when or where it'll show up
---------

Personal Web sharing on Mac OS X is cool. You get a home page on the internet right from your user's folder (in the sites folder)!

However, what if you have an external hard drive with a folder of MP3s created by iTunes that's 5 GB, and you want to list all the folders and files in there instantly? And you don't want to copy the songs to your Sites folder. You want to leave them on the hard drive.

Well the first step was to put an alias to the MP3 folder in your Sites folder. However that doesn't work.

Luckily, I know a little bit about Apache and UNIX, and apple has provided a link to the Apache manual.

Basically, the apache web server is the software that makes your web page available. When you activate web sharing, it's a running program, just like Internet Explorer is a running program. Of course mac os X won't ever show it.

The program is not called Apache. It's called httpd. If you go to terminal and type ps -aux, it will list all your processes. If web sharing is on, you'll notice httpd in there.

All the settings for Apache are controlled by text files, called configuration files. These are stored at /private/etc/httpd

(Note, you can not edit the configuration files unless you are root user.)

First I tried editing the config files under /private/etc/httpd/users, which are the configurations for the web sites for actual users on your computer. But nothing I did there worked! So I edited the MAIN apache config file. It is here:

/private/etc/httpd/httpd.conf

In the finder, select Go... Go To Folder. Type in /private/etc/httpd

The window will pop up. Also, have Text Edit Open. It should be in your dock. Drag httpd.conf to Text Edit (in the dock). It will open up.

This file is nicely commented with many instructions. You are looking for this text, about 1/3 of the way down the file...

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Library/WebServer/Documents

Anything preceded by a # is ignored. You just want to change DocumentRoot to /Volumes/[your hard drive name]/[your mp3 folder name]

a couple paragraphs down you must do it again. The text says

#
# This should be changed to whatever you set DocumentRoot to.
#

then the directory, make it the same:
<Directory "/Volumes/[your hard drive]/[your mp3 folder]

Now save the file. Make a backup if you'd like first. You cannot save changes unless you're logged in as root.

Now, when you view your web page, you'll see a list of your mp3s and folders instead of the default hello page!

If anyone knows why changing the the users config files don't work for me let me know!!

Also, if you screw up the config files, you can run the command:

apachectl configtest

You'll get an output showing you what's wrong.
__________________
-Soon 2 B mkiv Toyota Supra Twin Turbo 6 Speed --- supraforums.com-
Reply With Quote
  #2  
Old September 5th, 2002, 10:10 PM
symphonix's Avatar
Scratch &amp; Sniff Committee
 
Join Date: Jul 2001
Location: The Australian Jungles
Posts: 4,024
Thanks: 2
Thanked 2 Times in 2 Posts
symphonix is on a distinguished road
Hey, did you notice that iTunes 3 has XML export, so you can export a song-list to XML. There is apparently a default style-sheet, though you could tweak it with your own formatting. Getting it to link to the files wouldn't be too hard I expect.


__________________
- iMac G5 1.8GHZ 17" | SuperDrive | 160GB | 512MB | Airport Extreme | Bluetooth Keyboard & Mouse | Wacom Intuos II
- Pentax *ist DL - JVC MiniDV Camcorder - Airport Express - iPod Nano 1gb white
Reply With Quote
  #3  
Old September 6th, 2002, 12:04 AM
solrac's Avatar
Quad 6 ghz G5 Tower
 
Join Date: Oct 2000
Location: LA, CA
Posts: 840
Thanks: 0
Thanked 0 Times in 0 Posts
solrac is on a distinguished road
OH AWESOME.

And Flash can read XML, and also read ID3 tags! I could make a flash app to read your iTunes lists!!
__________________
-Soon 2 B mkiv Toyota Supra Twin Turbo 6 Speed --- supraforums.com-
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using other folders with Personal Web Sharing MtnBiker Unix & X11 14 March 15th, 2003 02:14 PM
How sercure is OS X's Web Sharing and File Sharing? PowerBookDude Mac OS X System & Mac Software 5 October 13th, 2001 02:06 AM
MacOS X Web Sharing Update RHITMacMan Mac OS X System & Mac Software 1 September 3rd, 2001 03:23 PM
Personal Web Sharing Bug? rhale1 Mac Classic System & Software 1 September 1st, 2001 06:18 PM


All times are GMT -5. The time now is 10:34 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.