|
Posted by Toby A Inkster on 02/13/07 15:58
Aggelos wrote:
> Is it possible to run a script that will be used from all the websites
> on the server outside of the web dir ?
I'm not 100% sure what you're asking for, but it sounds to me like
symbolic links might be the answer.
Say you have three sites hosted on a server, example.com, example.org
and... you guessed it... example.net. These are hosted in the following
directories on the server:
/var/www/vhosts/example.com/
/var/www/vhosts/example.org/
/var/www/vhosts/example.net/
Now, you install some flashy-super-web-based-app into, say:
/var/www/apps/FSWBA/
and you want to make this available as:
http://example.com/FSWBA/
http://example.org/flashy/
http://example.net/flashy-app/
Then all you need to do is create three symbolic links, using the
following commands at the command line:
ln -s /var/www/apps/FSWBA/ /var/www/vhosts/example.com/FSWBA/
ln -s /var/www/apps/FSWBA/ /var/www/vhosts/example.org/flashy/
ln -s /var/www/apps/FSWBA/ /var/www/vhosts/example.net/flashy-app/
And you're done. (Note: you may need to configure Apache to be able to
follow symbolic links, as this ability is often disabled for security
reasons.)
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|