1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Common Directory for All Sites

Discussion in 'Plesk for Linux - 8.x and Older' started by dimitris, Apr 7, 2005.

  1. dimitris

    dimitris Guest

    0
     
    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
     
  2. ad7742

    ad7742 Guest

    0
     
    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
     
  3. ad7742

    ad7742 Guest

    0
     
    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
     
Loading...