LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-16-2006, 01:36 PM   #1
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Rep: Reputation: 30
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


Another question: When i reload apache, it stops working?
 
Old 03-17-2006, 05:57 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
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
 
Old 03-17-2006, 07:33 AM   #3
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
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?
 
Old 03-18-2006, 03:25 AM   #4
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
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
 
Old 03-20-2006, 05:49 AM   #5
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
But after i change it. Do i always have to reload apache? Is there someway to make it dynamic?
 
Old 03-20-2006, 06:46 AM   #6
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
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)
 
Old 03-20-2006, 06:51 AM   #7
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
during those seconds my server will be unavaible?
 
Old 03-20-2006, 07:12 AM   #8
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
yep, so i suggested another solution too.
robin
 
Old 03-20-2006, 07:15 AM   #9
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
do you know a way to host lots of phpbb using just one copy?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Create alias in MySQL? JockVSJock Slackware 2 02-23-2006 09:15 PM
What couses the modules.conf alias need... errno Linux - Enterprise 0 06-07-2004 10:39 AM
Apache 2.0 so many .conf files! lonny Linux - Software 1 12-09-2003 01:15 AM
Apache conf files 1111 Linux - Newbie 2 07-20-2003 02:29 PM
Lost alias line in modules.conf RebootKid Linux - Hardware 5 02-20-2003 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration