Wednesday, 16 March 2011

Add on help for linux learner

1.set up a domain addon1.com which should resolve in dns.The mail of
addon1.com should point to gmail mail server.

  $TTL    86400
$ORIGIN sym.com.
@               IN SOA  ns.sym.com.       root.sym.com. (
                                        2011022300              ; serial (d. adams)
                                        900             ; refresh
    

                                  900             ; retry
                                        900             ; expiry
                                        900 )           ; minimum


sym.com.        IN A            192.168.2.158
                       IN NS                ns.sym.com.
                       IN MX   10   gmail.com.
      
ns                   IN A            192.168.2.158

Output:            
[root@158 ~]# host sym.com
sym.com has address 192.168.2.158
sym.com mail is handled by 10 gmail.com.

2)for a sub domain add a entry in your main domain db file

  $TTL    86400
$ORIGIN sym.com.
@               IN SOA  ns.sym.com.       root.sym.com. (
                                        2011022300              ; serial (d. adams)
                                        900             ; refresh
                                        900             ; retry
                                        900             ; expiry
                                        900 )           ; minimum


sym.com.        IN A            192.168.2.158
                 IN NS                ns.sym.com.
ns              IN A            192.168.2.158
sym2             IN A   192.168.2.158 //subdomain entry


goto cd /usr/local/apache2/htdocs/
      mkdir sym2
      vim index.html
goto cd /usr/local/apache2/conf/extra/
     vim httpd-vhosts.conf
Main domain:
    <VirtualHost 192.168.2.158:80>
    #ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "/usr/local/apache2/htdocs"
    ServerName sym.com
DirectoryIndex index.html
#Redirect / http://www.gmail.com
#DirectoryIndex index.html index.php
    #ServerAlias www.dummy-host.example.com
    #ErrorLog "logs/dummy-host.example.com-error_log"
    #CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>

sub-domain & addon-domain :
<VirtualHost 192.168.2.158:80>
   DocumentRoot "/usr/local/apache2/htdocs/sym2"
    ServerName sym2.com              //addon domain
ServerAlias sym2.sym.com             //subdomain
 </VirtualHost>
restart
lynx sym.com
lynx sym2.com
lynx sym2.sym.com  //addon domain
lynx sym.com/sym2  //sub domain

1 comment:

  1. Php Curl.............
    1.wget http://curl.freeby.pctools.cl/download/curl-7.21.4.tar.gz
    2.untar it
    3../configure
    4.make make install
    5.To configure php with curl
    6.go to php path
    7.un tar it
    8../configure --with-curl
    9.--with-mysql
    10.--with-apxs2 =/usr/local/apache2/bin/apxs
    11.make make install
    12. vim /usr/local/apache2/htdocs/indexcurl.php
    #add this:
    #13. vim /usr/local/apache/conf/http.conf
    #
    #ServerName exam1.com
    # DocumentRoot /usr/local/apache2/htdocs
    # DirectoryIndex indexcurl.php
    #



    addon :

    #
    # ServerName addon.com

    # DocumentRoot /usr/local/apache2/htdocs
    # DirectoryIndex index.php
    #
    #
    # ServerName addon.exam1.com
    # Redirect / http://addon.com
    # DocumentRoot /usr/local/apache2/htdocs
    #



    Forum:
    Install phpBB.....


    1.phpBB3 tar.gz
    2.untar it and cp phpBB3 to htdocs
    3.http://192.168.2.151/phpBB3/ to check php is installed

    ReplyDelete