Page 1 of 1
Create Apache Alias Using PHP
Posted: Mon Mar 17, 2008 7:03 am
by mad_phpq
Can anyone tell me if its possible to write php code to add/edit an apache alias.
Re: Create Apache Alias Using PHP
Posted: Mon Mar 17, 2008 7:54 am
by Sekka
As long as the PHP file has the right permissions and access rights to edit the httpd.conf, I don't see why not.
Please note this is purely guess work on my part.
Re: Create Apache Alias Using PHP
Posted: Mon Mar 17, 2008 3:58 pm
by RobertGonzalez
Do you really want PHP doing this?
Re: Create Apache Alias Using PHP
Posted: Wed Sep 10, 2008 11:16 am
by mad_phpq
Wow! Forgot i asked this and recently its cropped up again.....
yes, i think i will have to edit the httpd.conf directly. We have a site generator that adds applications outside a web root. We need to be able to create aliases...... just had a terrible feeling while typing this, thinking that we need to restart apache everytime i want to add an alias. There has to be another way.
Re: Create Apache Alias Using PHP
Posted: Wed Sep 10, 2008 2:44 pm
by RobertGonzalez
(Almost) Any time you mess with a conf file you will have to restart the daemon. Such is the case with Apache, MySQL and PHP.