Re: PHP to control Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/09/2011 01:16 AM, Jorge Schrauwen wrote:
On Tue, Feb 8, 2011 at 3:01 PM, Matus UHLAR - fantomas
<uhlar@xxxxxxxxxxx>  wrote:
On 06.02.11 23:05, Lars Nielsen wrote:
I am writing a PHP application to control primarily my VirtualHost
configurations in Apache(2.2.9). Can you guide my to any good knowlegde
of
  1. how to structure the generated configurationfile(s)
  2. how to reload/restart apache from PHP?

mod_perl is designed to do such things. It can do much more of course.
Here is a simple example:
http://wiki.apache.org/httpd/ApacheVirtualHostMysql


The problem with using mod_perl is one needs to know perl to a decent extent or at least db operations in perl. It is a strict requirement. Where as if you use inotify events to reload the config file when it is changed, there's no requirement of perl, you can do the automatic config modifier in your favorite language.

Another idea (may be bad one) is to use a RewriteMap and generate rewrite maps using php (it would be a highly cpu intensive task for apache probably, no ideas..never used rewritemap)

--
Regards,
Nilesh Govindarajan
Facebook: http://www.facebook.com/nilesh.gr
Twitter: http://twitter.com/_linuxgeek_
Website: http://www.itech7.com

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux