• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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