0

I edit /etc/hosts file to add domains. I add new virtual host for new domain. So I can easily develop.

What I want now is to have apache conf to

  1. if there is a virtualhost domain definition follow
  2. if not, look for /var/www directory, if there is dir follow
  3. if there is not, redirect to /var/www/nerkn

Can apache conf make it?

1)Example domain example.com

  1. there is no example.com in virtualhost
  2. there is a directory named /var/www/example.com so server there

2)Exampple domain ex2.com

  1. there is no ex2.com in virtualhost
  2. there is no directory named /var/www/ex2.com
  3. serve from /var/www/nerkn

1 Answer 1

0

Mod_vhost_alias, where nerkn defined as default virthost

VirtualDocumentRoot d:/Sites/%0/web VirtualScriptAlias d:/Sites/%0/cgi-bin 

define base location of bare minimum (my config)

while adding <VirtualHost dcweb.e-city.net.ru:80> allow redegine-add vhost-specific details

3
  • it only solves 2nd bu its ok. Thank you Commented Oct 18, 2011 at 13:33
  • it work most times for me in 1st mode - I just copy skeleton to the new site-location and have site ready without restart of apache Commented Oct 18, 2011 at 13:46
  • wonderful ln -s nerkn new-site Commented Oct 21, 2011 at 7:55

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.