• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Common Directory for All Sites

D

dimitris

Guest
Hi folks...

I have just bought a dedicated server running Fedora and Plesk 7.5 Reloaded. Nice stuff! :)

Some of the sites I am porting over have a common directory, the files of which are referenced relatively (e.g., <a href="../parent/images/a.jpg">, where "parent" could be the vhosts directory used by Plesk). Now they don't work anymore, as all relative referencing is ignored and I have to copy the common parent directory to the root of each site, which is not optimal.

It's probably an Apache thinkg, but still annoying. I looked inside httpd.conf but no reference to the sites is made there, so probably they are declared in a database?

Anyway, here's my question: is there any quick way of declaring a common parent directory using the above architecture? I don't mind hacking with Linux, or even httpd.conf, as long as it's not a major change in terms of either amount of coding and time.

Thanks,

Dimitris
 
One solution that comes to mind is to use symbolic links.

Copy all of the required shared files to a single directory (e.g. /home/shared) and then within each httpdocs folder simply make a symbolic link that points to /home/shared

e.g.

cd /home/httpd/vhosts/DOMMAINNAME/httpdocs
ln -s /home/shared sharedmedia

You would need to make sure that /home/shared is readable by apache and ensure that Apache is configured to allow FollowSymLinks.

Oh - you'd need to check if this is automatically backed up by psadump - not sure if it follows symlinks. Also, if it DOES follow symlinks then it's going to back the same data up multiple times... Just a few points to bear in mind!

HTH

Andy
 
Oh - one other thing... Plesk stores the rest of the httpd.conf information in a whole range of httpd.include files. One is within the /etc/httpd/conf folder and the rest are within the /home/httpd/vhosts/*/conf folders. Do not bother making any manual changes to these files - they are regularly rewritten by Plesk.

If you want to make any per-domain changes to Apache, use the vhost.conf file. There are plenty of examples of using these files within these forums. I seem to recall that there is also basic reference to this file in Chapter 6 of the Manual for Administrators (http://www.sw-soft.com/en/products/plesk75reloaded/docs/)

Cheers

Andy
 
Back
Top