SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2007
    Location
    Merida, MX
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question One web app, multiple domains

    Here is what we want to do: We want to have one instal of our flex/
    PHP/MYSQL app on the server, we want people to be able to have their
    own domain names, ftp accounts, and MYSQL databases. We want our
    centralized web app to be able to determine who is logged in and use
    the assets from that users domain (like the DB). All of the different domains would be hosted on the same server as virtual domains.

    Is this possible, and if so, has anyone successfully created an
    approach like this? Thanks in advance for your help.

  2. #2
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd say with virtual domains, you best bet is to use .htaccess or something similar to detect the current domain and load up the corresponding configuration settings for it.

    You could conceivably redirect all requests to an index.php and have the .htaccess put the domain in the query string like "index.php?domain=example.com". Your boot file (index) would then load a dynamic config loader based on the domain that was passed. Then have the configuration settings all based on the domain so you can look them up, either by file or in a master database.

    Don't forget to filter the domain, because it's potential user input!

  3. #3
    SitePoint Member
    Join Date
    Aug 2007
    Location
    Merida, MX
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cool

    thanks for the tips. I have been searching google for a couple of hours and read about sim-links, does anyone have experience with those? I need our web app to share most of the same files, but use different databases on different domains (same Vhost), and use the domain's files first, then, if the domain doesn't have the files, use the "central" install of the web apps files.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •