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
https://forums.phpfreaks.com/topic/243647-create-virtual-servers-with-php/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.