Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

Please help!

share|improve this question

1 Answer 1

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. [...]

[...]

Examples:

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

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

share|improve this answer

Your Answer

 
discard

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.