Jump to content

apache httpd.conf if not exists use different directory rule


Recommended Posts

Hi,

 

I am pretty new to configuring the apache config files. I have heard that there is a hddp.conf file that can be used as a redirect. What i want is lots of sites to use the same files instead of copying them over each time i make a change.

 

How do i make is so that if the file does not exist then it will lookup the file in another directory.

 

e.g

/var/www/vhosts/testsite1/foo.html

/var/www/vhosts/testsite2/foo.html

/var/www/vhosts/testsite3/foo.html

/var/www/vhosts/testsite4/foo.html

 

/var/www/vhosts/main_site/foo.html

 

 

none of the testsites have foo.html but main_site does. how do i make a rule so for all sites, if a file accessed does not exist then look it up in /var/www/vhosts/main_site/directory

 

I know this can be done but don't know how

 

Chris

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.