Jump to content

Create Virtual Servers with PHP?


Nightmareinhell

Recommended Posts

Hello!

 

I was wondering, is there anyway to create virtual servers using PHP?

 

Basically what I'm trying to do is... make it so someone can fill out a forum, it will create a folder and files on the server, and then they can point their domain to the server and it will go to the folder.

 

I'm thinking this is done with virtual servers?  Is there a way to make this process automated because from my searching it looked like you had to manually edit to httpd config file.

 

Thanks you guys so much for any help!

Link to comment
Share on other sites

Of course this can be scripted. You can include config files within config files in Apache, so you just create  a new config file for each new domain.

 

However, you wouldn't use plain old virtual hosts for this because Apache needs to be restarted for them to take effect.

 

You would need to use mod_vhost_alias. See http://httpd.apache.org/docs/current/vhosts/mass.html

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.