httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Swift <Swi...@swiftys.org.uk>
Subject Re: [users@httpd] httpd-vhosts.conf using include
Date Tue, 06 Sep 2011 19:30:54 GMT
You can arrange them any way that you like. The include statement includes
the referenced file(s) at the point where it is encountered. You could
expand all of this out, and create a single httpd.conf file, and it would
work exactly the same. Or you could have an include statement for every line
in your config, with each included file containing just one line.

The include mechanism makes it easier to manage, is all. Things I use
"include" for:

1. You can remove "stuff" fron your config by commenting out the "include".
So if you add a new Vhost, and define it in a new Include file, then you can
remove it with a very simple comment character if it causes problems.

2. It allows you to replace identical sequences of statements in two or more
places, for example, you might apply some common ScriptAlias statements
across multiple Vhosts (for example, "Scriptalias /test
/var/www/cgi-bin/text.cgi" might be useful in all of your Vhosts. If you add
it using "Include", then a single change to the include file will update all
of your virtualhosts.

On 6 September 2011 19:55, Norman Fournier <norman@normanfournier.com>wrote:

> Hello,
>
> I am working on rebuilding a web server after a crash. In my previous
> httpd.conf file, include was used to point to virtual host .conf files. In
> this httpd.conf file it points to httpd-vhosts.conf for virtual hosting. My
> question is should I include my vitual hosts in the httpd-vhosts.conf or can
> I use still include in the httpd-vhosts.conf file to point to individual
> .conf files for my virtual hosts?
>
> I have googled for the answer but each examples includes the virtual host
> in httpd-vhosts.conf.
>
> Thank you for your help.
>
> Norman
> ---
> www: http://www.normanfournier.com
> facebook: http://www.facebook.com/normanfournierdotcom
> linkedin: http://www.linkedin.com/profile/view?id=18127460
> youtube: http://www.youtube.com/user/normanfournier
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Steve Swift
http://www.swiftys.org.uk

Mime
View raw message