Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please excuse me if my logic is flawed as I am really new to Centos.

I know I can define multiple virtual hosts in my httpd.conf file. But what I would like is to define virtual hosts in individual files as I am used to doing under Ubuntu. In Ubuntu, my virtual hosts are defined in files under my /etc/apache2/sites-available and individually enabled ... but I can't find a similar structure & system under Centos.

share|improve this question

This should help you:

Include Directive

This directive allows inclusion of other configuration files from within the server configuration files.

Shell-style (fnmatch()) wildcard characters can be used to include several files at once, in alphabetical order. [...]



Include /usr/local/apache2/conf/ssl.conf

Include /usr/local/apache2/conf/vhosts/*.conf

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.