1

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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