Jump to content

Dynamic VirtualHost Problem - reading from DB or Flat File?


virtualpsm

Recommended Posts

Hello all.  I have been researching dynamic virtualhosts for about a month now and still can't seem to figure out the best solution to my problem. 

Basically, I want to be able to add subdomains & domains to Apache 2.0 dynamically, but I can't figure out how to get them into my VirtualHost. 

I understand apache can dynamically construct vhosts based on the directory structure, but the problem I see there is that I want each site to have the same code base/document root, not read from their individual directories.

I read on apache's docs that mod_rewrite can read in an external file, which may be a possibility.  I would just need to write the corresponding PHP script that would append to or delete from that file when hosts are added/deleted.

Can anyone help me here?  The ideal for me would be to have a directory of flat files (one for each vhost) to read with the vhost information or construct it from my SQL database.  I'm open to all ideas.

Thanks in advance.

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.