Answer the question
In order to leave comments, you need to log in
2 Users, 2 Sites, 1 Shared Folder
Good day to all.
There are:
- VPS server
- two users (site1, site2)
- two sites (site1, site2)
Site1 is owned by user site1, similar to site2.
Sites are online stores with the same products, but designed for different regions. Server resources are not elastic, and product images take up >4 GB (per site). Therefore, I want to somehow optimize this whole thing and create 1 folder, images from which both sites will take.
Tell me how to make it beautiful and so as not to damage safety.
Answer the question
In order to leave comments, you need to log in
http://img.domain3.ru/product_sku_0.jpg
http://img.domain3.ru/product_sku_1.jpg
http://img.domain3.ru/product_sku_2.jpg
...
RewriteRule ^images/(.*) http://site3.ru/images/$1
Under Apache - something like that. Didn't check!
As an option, move the folder with pictures to a higher level for both folders (sites), or put a third folder next to them.
And then setting up nginx
server
{
server_name site1.ru;
<b>location /images/
{
root /home/images;
}</b>
}
server
{
server_name site2.ru;
<b>location /images/
{
root /home/images;
}</b>
}
uh guys what are you thinking here? make a regular soft link and that's it!
man ln
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question