Is it possible to control apacheīs alias using mysql and not .conf files?
I want to know if itīs possible to make apache work with mysql. Actually, i want to make the .conf file be tables on mysql.
Like --------------------------------------- |value1 | values2 | --------------------------------------- |DirectoryIndex | index.php index.htm | --------------------------------------- This is supposed to be a mysql query :eek: Another question: When i reload apache, it stops working? |
Apache can work with mysql(that I assume you already know).
You can use aliasing too with mysql, I am giving you the code ,but what you could try is - try to include a httpd.include (for a particular alias) ,then put your values in mysql table, and using PHP edit the httpd.include file. For more information about httpd.include(which is seperate from httpd.conf , the global option ,read the apache manuals) Robin |
the problem is that this is a heavy traffic site which make lots of alias.
Sure i can do like you said, i can even use, for example, shell_exec() on php. But i wouldn't put my hands on fire for this. I think mysql would be better. Do you know a mod that can do this? |
well you can use exec or shell_exec to modify the file but if you want to modify the file using Mysql I don't think that it is possible.(in fact how can a database modify another file) - if you prefer you can write a cgi(maybe in perl) which does the work for you.
Robin |
But after i change it. Do i always have to reload apache? Is there someway to make it dynamic?
|
use cron or similiar tool to restart apache -it will just take seconds
if your server is mission critical or requires 24 hr uptime, then you can try using vhosts(each with seperate configuration file) one of them will be running while you configure your another vhost. if you are having trouble setting up vhosts try a simple tool called plesk(do some googling) |
during those seconds my server will be unavaible?
|
yep, so i suggested another solution too.
robin |
do you know a way to host lots of phpbb using just one copy?
|
All times are GMT -5. The time now is 08:08 AM. |