You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by likai <li...@hotmail.com> on 2008/08/22 06:02:51 UTC

[users@httpd] is there any include or reference mechanism in apache to store common entries somewhere and include them in virtualhost

Hi,
 
Right now, in my httpd.conf I have two sets of virtualhosts for two IPs. I just made a copy of the first one and change the IP to another.
By doing this, I created a lot of duplicated entries.
 It may cause apache to load a lot of duplicated entries. 
And sometimes it cannot promise that the contents are the same with the two sets of virtualhosts.
 
Listen 443
<VirtualHost IP1:443>
ServerName IP1:443
XXXXXXXX
....
</VirtualHost>
 
<VirtualHost IP2:443>
ServerName IP2:443
XXXXXXXX 
....
</VirtualHost>
 
So is there any include or reference mechanism in apache ?
Like storing the common entries in one place, and referencing or including these in the virtualhosts like described below.
 
<common>
    xxxxxxxx
    .....
</common>
 
<virtualhost IP1:443>
include common
reference common
</virtualhost>
 
 
 
<virtualhost IP2:443>
 
include common
 
reference common
 
</virtualhost>
 
 
Any comment will be highly appreciated.
 
Thanks,
_________________________________________________________________
看MSN史诗巨片,票选人气角色,赢取PSP等诸多好礼!
http://im.msn.cn/

[users@httpd] Performance question

Posted by "Guus Ellenkamp (Active Discovery Designs)" <gu...@activediscovery.net>.
I am working on a new project that might get "big". However, until now I was
only involved in small sites with not so much traffic easily hosted on a
shared server with some hosting provider.

My question is: what is "big" in terms of current hosting. Is it 1.000.000
hits per day or 10.000.000 hits per day. And is it 1.000.000 mySQL records
in a table or 20.000.000.

I'm just trying to do some contingency planning: what do I need to do if my
current hosting solution is not enough: shared-server -> private server ->
multiple servers -> ???

Any advise would be helpful.


---------------------------------------------------------------------
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


Re: [users@httpd] is there any include or reference mechanism in apache to store common entries somewhere and include them in virtualhost

Posted by Davide Bianchi <da...@onlyforfun.net>.
likai wrote:
> Hi,
> 
> Right now, in my httpd.conf I have two sets of virtualhosts for two
> IPs. I just made a copy of the first one and change the IP to
> another. By doing this, I created a lot of duplicated entries. It may
> cause apache to load a lot of duplicated entries. And sometimes it
> cannot promise that the contents are the same with the two sets of
> virtualhosts.
> 
> 
> So is there any include or reference mechanism in apache?

You can include a configuration file into another, but what difference
does it make? The resulting config file will still have the same
complexity and changing in one place means that you can potentially
screw up something else in another place.

Davide

-- 
Windows isn't CrippleWare -- it's "Functionally Challenged".

---------------------------------------------------------------------
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


RE: [users@httpd] is there any include or reference mechanism in apache to store common entries somewhere and include them in virtualhost

Posted by likai <li...@hotmail.com>.
Thanks to Krist.

That's exactly what I want.


> Date: Fri, 22 Aug 2008 11:09:16 +0200
> From: krist.vanbesien@gmail.com
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] is there any include or reference mechanism in apache to store common entries somewhere and include them in virtualhost
> 
> 2008/8/22 likai <li...@hotmail.com>:
> > Hi,
> >
> > Right now, in my httpd.conf I have two sets of virtualhosts for two IPs. I
> > just made a copy of the first one and change the IP to another.
> > By doing this, I created a lot of duplicated entries.
> 
> Probably mod_macro is what you need.
> 
> Krist
> 
> -- 
> krist.vanbesien@gmail.com
> krist@vanbesien.org
> Bremgarten b. Bern, Switzerland
> --
> A: It reverses the normal flow of conversation.
> Q: What's wrong with top-posting?
> A: Top-posting.
> Q: What's the biggest scourge on plain text email discussions?
> 
> ---------------------------------------------------------------------
> 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
> 

_________________________________________________________________
快来看看这些猫咪有多逗,爆笑!
http://cnweb.search.live.com/video/results.aspx?q=%E5%8F%AF%E7%88%B1%E7%8C%AB%E5%92%AA&Form=MEVHAA

Re: [users@httpd] is there any include or reference mechanism in apache to store common entries somewhere and include them in virtualhost

Posted by Krist van Besien <kr...@gmail.com>.
2008/8/22 likai <li...@hotmail.com>:
> Hi,
>
> Right now, in my httpd.conf I have two sets of virtualhosts for two IPs. I
> just made a copy of the first one and change the IP to another.
> By doing this, I created a lot of duplicated entries.

Probably mod_macro is what you need.

Krist

-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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