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 > home and sites directory

home and sites directory
Thread Tools
cnelson87
Forum Regular
Join Date: Jul 2002
Location: Seattle
Status: Offline
Reply With Quote
Jul 23, 2004, 07:00 PM
 
I would like to move my "sites" directory from my "home" directory to a portable firewire drive so that I may take my work with me, or maybe set up a second "sites" directory on the firewire drive (that would be best). I need to be able to run some basic PHP and MySQL. Can this be done?
Yes, I tried a search, but there were like a million and one results.
Thank you,
Chris
     
cnelson87  (op)
Forum Regular
Join Date: Jul 2002
Location: Seattle
Status: Offline
Reply With Quote
Jul 26, 2004, 02:45 PM
 
one bump and then I'll try the os X forum.
bump!
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jul 26, 2004, 03:52 PM
 
you can serve files from wherever the hell you like, as long as the local version of apache knows what you're trying to do. that's fine on your own machine, but every machine you plug that drive into will need to know too. i doubt you'll find many sys admins who will alter their httpd.conf just for you, when it's easier for you to be setup as a regular user, and then copy your files into the correct directory.
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
cnelson87  (op)
Forum Regular
Join Date: Jul 2002
Location: Seattle
Status: Offline
Reply With Quote
Jul 26, 2004, 05:36 PM
 
coolio. I thought maybe it would be the httpd.conf thingie. seems like I messed with that once when I updated to the latest php. it's been so long I've kind of forgotten about it. no worries for the sys admin since it's my own desktop and laptop i'll be working with.
feel free to describe how to change httpd.conf, otherwise I'll muddle through it OK, I did once before.
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jul 26, 2004, 07:04 PM
 
i'd say you just need to configure the VirtualHost section, where /volumes/firewire_drive/sites would be the DocumentRoot

feel free to google for the rest
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 26, 2004, 07:25 PM
 
You might try to use a symlink from your ~User directory to your FireWire Drive. It's easier, and it ought to work.

A symlink is basically an Alias that works on *Nix. It will work just like an Alias, so you'd put it in the Sites Folder, and it would redirect to the External Drive.

It may just be easier for your needs.
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jul 26, 2004, 07:39 PM
 
good point. i certainly do things the hard way, sometimes
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
cnelson87  (op)
Forum Regular
Join Date: Jul 2002
Location: Seattle
Status: Offline
Reply With Quote
Jul 27, 2004, 12:53 PM
 
since I would prefer not to move the whole sites directory, just a couple subfolders, it sounds like a symlink is the way to go.
sooo, what is a symlink? how do I make one?
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jul 27, 2004, 01:43 PM
 
Originally posted by cnelson87:
since I would prefer not to move the whole sites directory, just a couple subfolders, it sounds like a symlink is the way to go.
sooo, what is a symlink? how do I make one?
a symlink is similar to an alias. apache doesn't like you using an alias, though. use terminal:
ln -s /path/to/original/directory /path/to/link

for more info, see man ln
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 27, 2004, 01:43 PM
 
To tell the truth, I've never made one. It's a Terminal job though.

A cursory google search revealed this automated script to convert a regular Alias to a symlink, and a Shareware app to make them.

I'm sure you could google up the step by step directions for doing it in the Terminal too, or you could read the man page from Apple.
     
   
 
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 04:38 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.,