Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 17th, 2012, 07:23 AM
colpaarm's Avatar
colpaarm colpaarm is offline
300lb Bench!
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2001
Location: New York
Posts: 2,343 colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 5 Days 10 h 50 m 4 sec
Reputation Power: 60
Symbolic link not allowed error for mounted drive

Here's what I'm trying to accomplish. I have a macbook and want to place a symlink from my Sites directory (which apache can see) to my mounted usb drive. In the past, I just had everything locally under Sites and all was fine. So it was

/Users/my_user/Sites/directory/httpdocs/(my stuff)

I now want

/Users/my_user/Sites/(symlink)

and "symlink" points to my mounted usb drive (which has the same stuff as before). I created the symlink no problem. I set it up as a virtual host, so I modified my /etc/hosts file to add

127.0.0.1 mylocalsite.com

my httpd.conf file references my virtual hosts file, which has an entry for my site as so

Code:
<VirtualHost *:80>
    DocumentRoot "/Users/my_user/Sites/directory/httpdocs"
    ServerName mylocalsite.com
    ErrorLog "/private/var/log/apache2/mylocalsite.com-error_log"
    CustomLog "/private/var/log/apache2/mylocalsite.com-access_log" common
    <Directory "/Users/my_user/Sites/directory/httpdocs">
      Options            FollowSymLinks
      AllowOverride      All 
    </Directory>
</VirtualHost>


All of this worked fine and dandy until I tried replacing my local files with a symlink. I've googled for hours to no avail. I set FollowSymLinks. All of the directories on the mounted drive have 755 (or greater) access from the root directory up to the directory that has my site. My apache user is _www (which is standard I believe for Mac Os X), but my files are owned by "my_user", although this was never an issue when the files were local.

Everything I'm reading says that at this point I probably just have a permissions issue, but I don't see it. I even made my index file 777 access. Any thoughts?
__________________
Correspondence chess
nothingbutchess.com

Reply With Quote
  #2  
Old May 17th, 2012, 02:04 PM
colpaarm's Avatar
colpaarm colpaarm is offline
300lb Bench!
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2001
Location: New York
Posts: 2,343 colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level)colpaarm User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 5 Days 10 h 50 m 4 sec
Reputation Power: 60
After a little thought, I figured out what my problem was. My directory structure is

/Users/my_user/Sites/directory/httpdocs/(my stuff)

with everything under "Sites" being a symlink. However, my directive says

Code:
<VirtualHost *:80>
    DocumentRoot "/Users/my_user/Sites/directory/httpdocs"
    ServerName mylocalsite.com
    ErrorLog "/private/var/log/apache2/mylocalsite.com-error_log"
    CustomLog "/private/var/log/apache2/mylocalsite.com-access_log" common
    <Directory "/Users/my_user/Sites/directory/httpdocs">
      Options            FollowSymLinks
      AllowOverride      All 
    </Directory>
</VirtualHost>


The problem was the Directory part. This tells apache to follow all symlinks under httpdocs. Well my symlink starts at "directory". So I solved the problem by making "directory" a regular directory. So now /Users/my_user/Sites/directory is just a plain old directory. Then, I made "httpdocs" point to httpdocs on my thumbnail drive. Finally, I changed

<Directory "/Users/my_user/Sites/directory/httpdocs">

to

<Directory "/Users/my_user/Sites/directory">

So now it will follow all symlinks under "directory", which is what I was after.

Btw, usb drives are SLOW! I need to get myself a faster firewire or thunderbolt drive! Anyway, hopefully this will help save someone the hours of confusion I wasted on this matter.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Symbolic link not allowed error for mounted drive

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap