Results 1 to 4 of 4
Hi stuck on a problem, wondered if anyone had any ideas.
I have a dedicated server with two sites ie site1 & site2.
We have two sites which need to ...
- 07-05-2010 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 1
Sharing Images Between Two Sites On Same Server
Hi stuck on a problem, wondered if anyone had any ideas.
I have a dedicated server with two sites ie site1 & site2.
We have two sites which need to share the same images folder, the situation is
a shopping site (site1) with one category of products which we have decided to setup as dedicated site for (site2).
Our system uploads the images to site1 directory ie:
/home/site1/public_html/images/image1.jpg
I don't want to duplicate the images into site2 images directory so is there a way
of sharing them using the following url
/home/site2/public_html/images/image1.jpg (which pulls site1 image)
Hope this makes sense!
Cheers
Steve
- 07-05-2010 #2
If the pictures are and stay on the same server
and the permissions are set accordingly,
then a bind mount should solve your problem.
Basically you bind mount the source directory
/home/site1/public_html/images
to
/home/site2/public_html/images
For details, see
man mountYou must always face the curtain with a bow.
- 07-05-2010 #3
Or, - if site2 is readonly for these images- then there is a simpler way:
Just delete the (empty|redundant) images directory for site2
and add an alias /images to the apache virtual host of site2, that points to /home/site1/public_html/imagesYou must always face the curtain with a bow.
- 07-06-2010 #4Linux Newbie
- Join Date
- Apr 2010
- Location
- Novosibirsk, Russia
- Posts
- 136
Symbolic links can do the same too...)


Reply With Quote