HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Apache VirtualHosts with mySQL (http://www.howtoforge.com/forums/showthread.php?t=29603)

barney.parker 18th December 2008 12:12

Apache VirtualHosts with mySQL
 
Hi,

I remember seeing a tutorial on howtoforge some time back about setting up apache to allow multiple web sites through the virtualhosts entries in it's conf files. The tutorial extended this by using data in a MySQL database nstead of the static conf file, so changes didn't require an apache restart.

After searching around all morning i can't seem to find it anywhere!!!

Does anyone have a link to this tutorial or something similar? I'm not bothered about email however if it's included in the tutorial thats OK.

Thanks in advance for any help anyone can give pointing me in the right direction!!!

Thanks

zcworld 18th December 2008 12:35

as far as i know that cant be done ...
but thats only to what i know

maybe it could / can be done ... it will be diff to see apache vhost conf done via mysql backend but
you would still need to restart / rehash apache to get it to load the new sites / any changes that are made to the database conf file


so i done really see a point to trying to run apache vhost conf from mysql
.. just my pov on the topic sorry to be a tad down on it

as long as you tell apache to restart it shouldn't take any sites offline / any downloading file to stop downloading from your sites

barney.parker 18th December 2008 13:28

OK, maybe i have got something confused.

How would somehting such as ISPConfig handle a new domain being added? Would it Apache seriously expect a restart just to add a new site?

Essentially what i want to do is have a database back end which defines the domains pointing to this server, a list of users (associated to domains) with all their priviliges etc, and automatically have Apache, ProFTP, MySQL and probably a mail system automatically use this information to manage access.

zcworld 18th December 2008 14:39

i know the ISPconfig pack
runs two ver of apache
one is running the admin control panel
and one is running the normal www / sites

when you add new host / domain
as far as i know its restart apache on the fly

but you have to want and get a good answer from one of the ISPconfig dev

barney.parker 18th December 2008 15:35

OK, so potentially the only way would be to have a script that generates new conf files on every change....

seems like a shame really to have to activate a script to update things that are already updated elsewhere....

Am i right in thinking however that Postfix et al can use a MySQL Backend for mail delivery and management on multiple domains?

Also, from some of the how-to's on this site it seems ProFTP will do the same?

It seems a real shame you can't make all three work together in a simplified manner from a single database....

or have i missed something completely? (it wouldn't be the first time!!!)

falko 19th December 2008 18:03

Quote:

Originally Posted by barney.parker (Post 160435)
Hi,

I remember seeing a tutorial on howtoforge some time back about setting up apache to allow multiple web sites through the virtualhosts entries in it's conf files. The tutorial extended this by using data in a MySQL database nstead of the static conf file, so changes didn't require an apache restart.

After searching around all morning i can't seem to find it anywhere!!!

I don't think we have such a tutorial (at least I don't remember). There once was a project that tried to create an Apache module that allowed to store vhosts in a MySQL database, but I think it's dead now. :(

Leszek 19th December 2008 19:18

As far as I remember there was a module like that for Apache 1.x but not for 2.x
I was looking for it to but gave up after some time.
There is a howto here about Lighttpd using MySQL.
Maybe at least that would be useful for You.


All times are GMT +2. The time now is 08:57.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.