Symlinking albums to other vhosts on server

steveparks

Joined: 2005-08-29
Posts: 25
Posted: Mon, 2005-08-29 17:43

I'd like to be able to use gallery to manage media files that are accessed by all my other websites. I have a dedicated server, running Plesk, RHEL3 and Apache2. Each domain is set up as a vhost.

To explain in more detail, I'd like to be able to have one album in my gallery installation that has different subfolders for my website images - all the company logos, photos, audio files.

I'd then like to be able to symlink that album directory to a directory on the website - such as www.examplesite.com/sharedimages/

But the gallery installation is at www.examplegallery.com, and say for example that my files are in a folder above the webroot: /home/httpd/vhosts/examplegallery.com/gallery

So my idea was as follows:

1. In the directory /home/httpd/vhosts/examplesite.com/httpdocs/ I ran the command ln -s /home/httpd/vhosts/examplegallery.com/gallery/albums/sharedimages sharedimages

2. I then made sure that ownerships and permissions were right as I'd had to use root to set the above up.

3. I tried to link to an image: http://www.examplesite.com/sharedimages/logo/logo.jpg and it didn't work.

4. next I created a 'vhost.conf' file in /home/httpd/vhosts/examplesite.com/conf which looked like this:

<Directory /home/httpd/vhosts/examplesite.com/httpdocs>
php_admin_value open_basedir "/home/httpd/vhosts/examplegallery.com/gallery/album/sharedimages:/"
</Directory>

5. Then I issued the command: /usr/local/psa/admin/sbin/websrvmng -a -v

6. Finally I restarted apache

7. I tried the audio file again, and it still didn't work.

Interestingly it's an odd error message i get:

Quote:
Forbidden

You don't have permission to access (the file) on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Please could anyone help me resolve this problem? My fallback plan is having to keep two filestores for a while, but I'd really rather try to find a smart soultion!

Thanks for any help
Steve

----
The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version: last nights build!
Apache version: 2
PHP version (don't just say PHP 4, please): 4.3.2
Graphics Toolkit:
Operating system: RHEL3 as part of Plesk
Web browser/version (if applicable):