Is it possible to control apacheīs alias using mysql and not .conf files?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.