Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-28-2005, 03:27 PM   #1
Registered: Jul 2004
Location: Jemna, Tunisia
Posts: 46

Rep: Reputation: 15
Adding virtual host

How can I add/edit Apache VirtualHost from PHP , of course including registring new subdomain or editing it. I m sure that it's possible but I don't know exactly how to do it in PHP. I tried to edit the apache confi file directly (demand much parsing) and changing the zone file of the dns (parsing too). Please help me with the best method you know please.
Old 09-28-2005, 03:54 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
You would need to write the php script to edit the files and just make sure that the user the script is running as has read and write access to the config file(s).

This will likely reduce your security quite a bit though.
Old 09-28-2005, 04:01 PM   #3
Registered: Jul 2004
Location: Jemna, Tunisia
Posts: 46

Original Poster
Rep: Reputation: 15
thank you

thank you very much david for your answer.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Virtual Host abridge Linux - Software 1 04-13-2005 07:35 AM
virtual host ziggie216 Linux - General 2 12-22-2003 06:38 PM
Virtual host and apache Samspeed Linux - General 8 08-06-2003 07:41 AM
Virtual Host |Drakehash| Linux - Networking 0 07-17-2003 03:02 PM
VIrtual host thep Linux - General 10 08-06-2002 11:28 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:00 AM.

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