0

I'm trying to use a TurnKey LAMP server as a sandbox web-development environment for a project with components in php and binary executables. My host machine is OS 10.6. I want to use AFP to serve a directory from my host machine so that I can make changes and quickly test them (i.e. a sandbox). I did a lot of research to get the virtual machine (running Ubuntu) to mount an AFP share and was finally successful, but I have run into configuration problems with Apache that cause it to raise a 403 error for the shared directory. I just need some help getting Apache configured to serve this directory.

Here are the steps to reproduce the situation:

  1. Download and install the TurnKey LAMP server.
  2. While you wait, download afpfs-ng.
  3. Also while you wait, set up an additional afp share on the mac with an easy username and password.
  4. Run the following commands on the shell of the lamp vm.
    1. apt-get install build-essential libfuse-dev libreadline-dev libgcrypt11-dev libgmp3-dev libgmp3c2 libgmpxx4ldbl
    2. modprobe fuse
    3. copy the afp tarball to the vm
    4. tar -xf afpfs-ng-0.8.1.tar.bz2
    5. cd afpfs-ng-0.8.1
    6. ./configure
    7. make
    8. make install
    9. cd /var/www
    10. mkdir shared_via_afp
    11. mount_afp 'afp://user:-@host_computer/share-name' shared_via_afp

Trying to access this directory from a web browser just raises a 403. What next?

Here are the resources I used to get afp to work:
http://sites.google.com/site/alexthepuffin/home
http://guide.ubuntuforums.org/showthread.php?t=1011312&page=2
http://stackoverflow.org/wiki/Mount_an_AFP_share_from_Linux
http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FAQ

Jonathan Swinney
  • 470
  • 1
  • 5
  • 16
  • I've gotta ask why you're using AFP rather than NFS if you intend to share to a *nix box? afpfs-ng is a FUSE plugin, so I'm guessing that the Apache daemon doesn't have access to FUSE'd mountpoint. I'm not sure how, but you'd have to get the Apache account to do the FUSE mount. (...Or use NFS...) – gWaldo Sep 15 '10 at 20:54

2 Answers2

0

I've gotta ask why you're using AFP rather than NFS if you intend to share to a *nix box?

afpfs-ng is a FUSE plugin, so I'm guessing that the Apache daemon doesn't have access to FUSE'd mountpoint. I'm not sure how, but you'd have to get the Apache account to do the FUSE mount.

(...Or use NFS...)

gWaldo
  • 11,957
  • 8
  • 42
  • 69
  • I did start with nfs but wasn't successful with that either. I don't think I ever got my mac to properly share via nfs. I'll look into that again. Tips? – Jonathan Swinney Sep 15 '10 at 22:09
0

I solved the problem with samba. I don't know if I just didn't do the right searches back in September or if it wasn't an option but setting up a samba server on the LAMP TurnKey virtual appliance is easy:

root@lamp /$ apt-get update
root@lamp /$ apt-get install samba
root@lamp /$ apt-get install webmin-samba

http://www.turnkeylinux.org/forum/support/20100330/add-samba-server-turnkey-joomla

Jonathan Swinney
  • 470
  • 1
  • 5
  • 16