|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hi there
Does anyone know if this could work, and how? I want to seperate my virtual hosts in seperate files and then dynamicly include these in the httpd.conf EX: in httpd.conf: include *.virtualhost in the visualhost files: <VirtualHost 192.168.0.1> ServerAdmin admin@company.com DocumentRoot [path to project] ServerName [project name] </VirtualHost> The trick should be that when you want to add a new virtual host, you just create a new file(projectname.virtualhost) with the needed info in. ![]() |
|
#2
|
|||
|
|||
|
You can't.
The "path to" or "relative path of your ServerRoot to" projectname.virtualhost file must be specified explicitly. #httpd.conf Include etc/apache/vhost.file #vhost.file <VirtualHost 192.168.0.1> ServerAdmin admin@company.com DocumentRoot [path to project] ServerName [project name] </VirtualHost> <VirtualHost 192.168.0.1> ServerAdmin admin@another_company.com DocumentRoot [path to another project] ServerName [another project name] </VirtualHost> All you need is to alter vhost.file >>The trick should be that when you want to add a new virtual host If you don't like to alter your httpd.conf and don't like a 10k lines in one vhost.file. Try this: #httpd.conf (the first character of the domain) Include etc/apache/vhost.a Include etc/apache/vhost.b Include etc/apache/vhost.c Include etc/apache/vhost.d ... Include etc/apache/vhost.9 This at the very least should keep your vhost.file smaller, it doesn't matter if such file is blank. [This message has been edited by freebsd (edited August 21, 2000).] |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > httpd.conf and external files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|