views:

16

answers:

1

Currently i have 3 separate vhost files default,staging,and devel. I want www.example.com and example.com to use the default vhost. I want staging.example.com to use the staging vhost. Heres where the problem im having is; i want anything else ex. anything.example.com or else.example.com to use the devel vhost. what is the best way to accomplish this?

A: 

The first host Apache reads will be the default one.

I would therefore recommend inserting the default one on httpd.conf as this file is read first and then load up all VHosts as you wish.

Frankie
that makes sense, i guess my next question then would be where do i actually differentiate the different sub-domains?
@user398314 on my personal setup I have a folder where I list all domains like this `clientName_domainName.conf`. One file per domain. All sub-domains get into the same file. But this is just a matter of taste.
Frankie