#1 2025-07-06 04:22:06

PaulEscher
Member
2025-06-05
15

Using links for common files when you have 2 subdomains

All,

I have 2 subs, sub1.mydomain.com and sub2.mydomain.com.

They both have Piwigo installed into their root, but I am wondering if it is worth my time to put all of the common (and unchanging) files into the directory above and then use links to source those files into each subdomain.

Obviously local is out of the question, but how about doc, docs, include, install, language, themes, etc.?

Any others?

On the other hand, the base file install is only 57MB, while photos will be in the several GB range, so not much of a savings.

Thank you for a great product,
   Paul

Offline

 

#2 2025-07-06 19:49:41

OHappyDay
Member
2023-02-08
125

Re: Using links for common files when you have 2 subdomains

That would not be possible. A (sub-)domain has only access to its root folder and all folders below. Any physicl folders above are not accessible.

Offline

 

#3 2025-07-06 21:37:21

erAck
Only trying to help
2015-09-06
2221

Re: Using links for common files when you have 2 subdomains

It depends.. symbolic links are on file system level and actually work to point across directories outside the domain's document root as long as the user the web server runs as has access permissions down to that directory. However, determining the current (file's) directory in PHP code might then give the resolved wrong directory and not the domain's one, and maybe other quirks specific to Piwigo. In any case I think it's not worth the hassle.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact