March 12, 2010, 18:44:30 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Add your links to our directory. Click here to add your links.
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Add your links to our directory. Click here to add your links.
IT Resources
Pages: [1]
  Print  
Author Topic:

How to do a simple parking domain server

 (Read 2972 times)
0 Members and 1 Guest are viewing this topic.
TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2571



WWW
« on: July 17, 2006, 04:13:58 »

How to do a simple parking domain server

Probably a lot of you are trying to understand how it works a parking domains server. You may have some ideas about how to
do a new bussines with your registered domains and a private parking domain server. If you have already some domains on some parking domains servers then you already have traffic on them so you have a good place to start a new bussines.

1. What do you need for a parking domain server ?

1. A private server
2. Linux (debian in my case)
3. Some knowledge about Linux,DNS and webservers.
4. A directory script / some affiliates / publisher account etc.
5. Mimimum 2 ip addresses for your server
6. A domain name for your service

2. How it works the parking domain server ?

 You probably asked yourself how this stuff works. It's very simple: all those systems have a DNS that manages all parked domains with the same DNS data (same ip address for web, email and so on). After a DNS query your browser will get the IP from DNS and sends the request to web server what will answer with a page custom made for the domain what you requested.

3. How can we do a parking domain server ?

 First we need to have a fresh linux installed system with network and both ip's configured on this system.

 Second we need to configure a DNS server (in our case bind 9 from  Internet Systems Consortium http://www.isc.org/index.pl) to respond on all parked domains with the same data.

 Third we need to configure a web server (in our case Apache 2 http://www.apache.org) to respond to all domains with the same page.

 DNS Server configuration

 We create a file in /etc/bind/ named db.simple-parked with the next content:

Code:

$TTL            86400
@               IN      SOA     ns1.yourdomain.com. root.yourdomain.com. (
                                        2004112801 ; Serial //YYYYMMDDCC
                                        8h         ; Refresh
                                        4h         ; Retry
                                        2w         ; Expire
                                        1h )       ; Minimum
                        NS      ns1.yourdomain.com.
                        NS      ns2.yourdomain.com.


www                     A       your_primary_ip
@                       A       your_primary_ip

ns1                     A       your_primary_ip
ns2                     A       your_secondary_ip

mail                    A       your_primary_ip
imap                    CNAME   mail
pop                     CNAME   mail
smtp                    CNAME   mail

@                       MX      10 mail
Note: Serial is a combination of Year - Month - Day  and counter where counter (CC) is incremented every time when you restart/reload your bind configuration. In each day the counter (CC) is starting from 0.

After DNS Configuration  we need to tell DNS to know about this configuration so we need to modify named.conf.local (this is in my system. In other system probably you will modify directly named.conf file)

so at end of the file we add :
Code:
zone "parked-domain1.com" {
        type master;
        file "/etc/bind/db.simple-parked";
};

zone "parked-domain2.com" {
        type master;
        file "/etc/bind/db.simple-parked";
};

zone "parked-domain3.com" {
        type master;
        file "/etc/bind/db.simple-parked";
};
and so on ...

Obviously you will do a script (Perl/php) to to add/remove/modify from named.conf.local by your parked users.

After that we need to reload the new conf of the bind to get the new domains. I want to restart the bind hourly not every time when a user add a new domain or modify something in his parked domains. For that we create a new file in /etc/cron.hourly named bind-reload with the next content:

Code:
#!/bin/bash
/usr/sbin/rndc reload

The DNS part is ready ... was easy ... what do you think ?

Now we need to configure the Apache server to respond to all domains.
We replace the /etc/apache2/enabled-sites/default with
Code:
NameVirtualHost *
<VirtualHost *>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
and that's all.

After that you need a script (php/Perl) what is getting the domain name what you connected and personalise the webpage/directory or what you have in root of /var/www. For example just do a simple php script in root of /var/www
index.php
Code:
<?
echo "Server: ".$_SERVER['HTTP_HOST'];
?>
4. Conclusion

I think this are the necessary steps to do a simple parking domain system. From here you need to configure a script/directory,banners on default page, an admin area for users  etc ...

Some of you probably ask why 2 ip address on requirements ? Because a lot of Registras are not accepting 1 name server for your domains and is more safety in this way.

That's all folks.

« Last Edit: July 17, 2006, 04:27:53 by TheGodFather » Logged



bostam
Jr. Member
**

Points: 1
Offline Offline

Posts: 55


« Reply #1 on: July 19, 2006, 05:28:21 »

Nice article. But this is just the start ... Smiley
Logged
TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2571



WWW
« Reply #2 on: July 19, 2006, 05:46:19 »

Yes is just a "simple domain parking system"  Smiley

Regards
Logged

TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2571



WWW
« Reply #3 on: August 14, 2006, 04:45:39 »

Quote
Probably a lot of you are trying to understand how it works a parking domains server. You may have some ideas about how to  do a new bussines with your registered domains and a private parking domain server. If you have already some domains on some parking domains servers then you already have traffic on them so you have a good place to start a new bussines.

Full article is here
 
If is interested for you just Digg it or shout it  Smiley

Digg it here

Shout it   here

Regards
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!