February 08, 2010, 14:53:49 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Please support SEO4smf further development donating here or use paypal button from left menu.
 
   Home   Forum Help Search Directory Calendar Login Register   ** RSS 2.0 feedAtom feed


Downloads
Seo4SMF 0.2.9.10

Uploaded by TheGodFather
( January 14, 2009, 02:53:47)
Downloads/Views: 6622 / 8670

Recent
[Today at 04:52:35]

[Today at 03:29:07]

[February 07, 2010, 20:05:40]

[February 05, 2010, 22:27:27]

[February 05, 2010, 06:07:48]

[February 05, 2010, 05:32:41]

[February 05, 2010, 05:06:14]

[February 05, 2010, 04:38:47]

[February 04, 2010, 05:22:35]

[February 04, 2010, 04:22:14]
by TheGodFather on July 17, 2006, 04:09:00
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 ?

 - A private server
 - Linux (debian in my case)
 - Some knowledge about Linux,DNS and webservers.
 - A directory script / some affiliates / publisher account etc.
 - Mimimum 2 ip addresses for your server
 - 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:

 
$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 :

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:

#!/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

NameVirtualHost *

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
    ErrorLog /var/log/apache2/error.log
    CustomLog /var/log/apache2/access.log combined


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

Do you have comments ? Click here

Welcome, Guest. Please login or register.
Did you miss your activation email?
February 08, 2010, 14:53:49

Login with username, password and session length
Members
Total Members: 1927
Latest: king001001
Stats
Total Posts: 10204
Total Topics: 1757
Online Today: 26
Online Ever: 184
(October 23, 2007, 16:07:22)
Users Online
Users: 0
Guests: 19
Total: 21
Donations
Donations received from:
dreambox
g-c
Sakuragi
Anonymous
LinuxGuy
Linux Blog
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!