Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old August 21st, 2000, 10:43 AM
Ulrik N Ulrik N is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 1999
Location: Denmark
Posts: 83 Ulrik N User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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.



Reply With Quote
  #2  
Old August 21st, 2000, 11:07 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > httpd.conf and external files


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway