Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Because I have a lot of VirtualHosts in the file /etc/apche247/conf/extra/httdp-vhost.conf, this file is extensive and unorganized.

I know some ways to create the VirtualHost dynamic, but in the automatic installation of Apache (apt-get/yum/pacman install) using the sites-enabled folder.

However, with the compiled Apache such folders do not exist, and don't know a dynamic way (without the need to include the file in httpd.conf), to do this.

This is my Apache (2.4.7) folder:

root@ubuntu:/etc/apache247# ll
total 76
drwxrwxrwx  15 root root  4096 Jan 19 12:16 ./
drwxr-xr-x 153 root root 12288 Jan 19 21:38 ../
drwxr-xr-x   2 root root  4096 Jan 19 12:16 bin/
drwxr-xr-x   2 root root  4096 Jan 19 12:16 build/
drwxr-xr-x   2 root root  4096 Jan 19 12:16 cgi-bin/
drwxr-xr-x   4 root root  4096 Jan 19 21:40 conf/
drwxr-xr-x   3 root root  4096 Jan 19 12:16 error/
drwxr-xr-x   2 root root  4096 Jan 19 11:38 htdocs/
drwxr-xr-x   3 root root  4096 Jan 19 12:16 icons/
drwxr-xr-x   2 root root  4096 Jan 19 12:16 include/
drwxr-xr-x   4 root root  4096 Jan 19 12:16 lib/
drwxr-xr-x   2 root root  4096 Jan 19 21:37 logs/
drwxr-xr-x   4 root root  4096 Jan 19 12:16 man/
drwxr-xr-x  14 root root 12288 Nov 19 15:36 manual/
drwxr-xr-x   2 root root  4096 Jan 19 21:30 modules/
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Use Include in your main config file.

To get Debian-like sites-enabled:

Include /etc/apache247/sites-enabled/*

Or RHEL-like conf.d:

Include /etc/apache247/conf.d/*.conf

(creating the directory for each as appropriate)

share|improve this answer
    
Oh, just that? haha, thanks Shane! –  Patrick Maciel Jan 20 at 0:10

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.