Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Redirect MacOS personal web sharing to different drive

Redirect MacOS personal web sharing to different drive
Thread Tools
Avenir
Mac Elite
Join Date: Jan 2000
Location: Pittsburgh, PA
Status: Offline
Reply With Quote
Dec 4, 2005, 01:02 PM
 
This has to be really simple, but I can't figure it out, nor can I dig up instructions that I know exist somewhere online...

basically, I want to change my default sharing directory in the macos personal websharing setup to a different hard drive (partition, within my computer, not external)

I know I should be changing the /Library/WebSharing/Documents string within the httpd.conf (and conf.default?) files to something like /Volumes/Drive2/Folder but it doesn't seem to work for me... Is there more to it? and if this has been discussed before, can anyone please point me in the right direction.

Thanks all

(PS - For those wondering the reason, I have a directory of rather large image and audio files to share with others that resides on the Drive2 partition. copying them to the system partition is not an option, I need to somehow redirect the personal websharing to the other drive, if it all possible.)

spike[at]avenirex[dot]com | Avenirex
IM - Avenirx | ICQ - 3932806
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Dec 4, 2005, 01:14 PM
 
edit the DocumentRoot in httpd.conf to show the new location and reboot Apache. The easiest way to reboot Apache is to just turn web sharing off and on again.

Should you find that Apache doesn't reboot properly, you've probably made a syntax error in httpd.conf.

Your line will look like something like:
DocumentRoot "/path/to/directory"

mine looks like this:
DocumentRoot "/Users/registereduser/Sites"
so that when I go to localhost, it goes to my user directory instead of the default.
     
jay3ld
Senior User
Join Date: Jul 2004
Status: Offline
Reply With Quote
Dec 4, 2005, 02:01 PM
 
there is 2 places in that config file to change your directory.

now i dont know about getting to a second hard drive.

I created a symbolic link and put it in my Main hard drive called Website
then in the config i changed the doc root to
/Website

then the symbolic link has done the rest for me.
     
Avenir  (op)
Mac Elite
Join Date: Jan 2000
Location: Pittsburgh, PA
Status: Offline
Reply With Quote
Dec 4, 2005, 02:15 PM
 
restart apache. brilliant (I'm retarded).

everything works great, /Volumes/Drive2/Folder worked perfectly

thanks all for the help

spike[at]avenirex[dot]com | Avenirex
IM - Avenirx | ICQ - 3932806
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 09:05 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,