Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In my apache vhosts configuration, I have a number of vhosts that point to network locations, e.g our production files are stored on another server that is heavily backed up. If at any time the network location that the vhost points to is unavailable, apache will not start AT ALL, refusing all connections. This is not ideal, I would prefer Apache to just report an error with one of the vhosts and continue to serve the ones that are available. Is there any configuration options that would allow what I am trying to achieve?

Here is my current vhosts files, with some text bleeped out due to confidentiality.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin admin@****.com.au
DocumentRoot "E:/htdocs/instruments"
ServerName instruments.***.com.au
ServerAlias instruments.***.com.au
ErrorLog "logs/instruments.***.com.au-error_log"
CustomLog "logs/instruments.***.com.au-access_log" common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin admin@****.com.au
DocumentRoot "E:/htdocs/quotes"
ServerName quotes.***.com.au
ServerAlias quotes.***.com.au
ErrorLog "logs/quotes.***.com.au-error_log"
CustomLog "logs/quotes.***.com.au-access_log" common
</VirtualHost>

# This is the one that sometimes fails when the network location is unavailable. 
# I need apache to continue to start even when this fails.
<VirtualHost *:80>
  ServerName production.***.com.au
  DocumentRoot //san04/projects$
  <Directory "//san04/projects$">
    Options Indexes FollowSymLinks MultiViews Includes
    IndexOptions FancyIndexing NameWidth=*
    Order allow,deny
   Allow from all
  </Directory>
</VirtualHost>
share|improve this question
1  
That is by design. To my knowledge, there is no way around it. Other than removing the culprit vhost from the Apache configuration file entirely, the only solution I can think of is to host them on separate virtual Linux boxes, each running as the main host or a vhost in their respective Apache configurations. –  nojak Jul 24 '12 at 3:30
    
Never tested that, but maybe you could give a valid DocumentRoot (local filesystem) and use an Alias Diretive on / to redirect every request on th ereal //san04/projects directory. If it works you'll certainly have to make some extra security checks. –  regilero Jul 24 '12 at 8:06
    
Thanks for the help. Looks like I will have to think outside the box and see if there is another way to reference network locations through apache without using a vhost –  Nick Barrett Jul 26 '12 at 3:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.