Welcome Guest, Not a member yet? Register   Sign In
Simulate a Parking with a CodeIgniter application
#1

[eluser]JulianM[/eluser]
Hi,

This is probably a strange question but I am wondering if anyone here had the same problem. I am doing a research about how to simulate a parking application using CodeIgniter. Said that, imagine you have many domains that you want to park in this CodeIgniter application.

So, what I'd need is making possible to configure the domain nameservers to my hosts, for example I have:

domain1.com
domain2.com
domain3.com

configured to: NS1.MYNAMESERVER.COM and NS2.MYNAMESERVER.COM

I want those domains automatically available when the user changes the nameservers (like any other parked service).

Then, a CodeIgniter application should be able to detect domain1.com and use the appropriate configuration to display the information for that domain. A similar idea for the other two domains, and so on.

I have a VPS running with WHM and usually I did not experiment any problem running CodeIgniter applications, but this case is slighly different since I feel I'd need to do something with DNS or Apache configuration as well.

Do anyone of needed to implement something similar?

Thanks.
#2

[eluser]Sire[/eluser]
You can point the domains with DNS to the same ip number, and have Apache resolve with wildcard entry like with a " ServerAlias * " in a Virtual Host directive.

Then you can detect the domain using $_SERVER['HTTP_HOST'] in your CI application.
#3

[eluser]JulianM[/eluser]
Hi Sire, thanks for your response.

I thought in using automatic base_url config like explained here: http://codeigniter.com/wiki/Automatic_configbase_url/ (it worked very well for me in the past for other projects).

About using wildcards, sounds good. Will investigate a little more. This is just a simple idea I have in mind, and I am trying to figure how it would be resolved in case I implement a simple parking.

What if WHM is used for other accounts (that do not have nothing to do with the parking project). Do you think it still being possible to isolate a certain set of domains to use the parking, and other set of domains to not use it? I am thinking about using a dedicated IP for the parking and other different IP's for the separated accounts. But still need to figure how the NS should be configured. Any additional hint would be much appreciated.

Thanks,




Theme © iAndrew 2016 - Forum software by © MyBB