First Time using Virtual Hosts and BIND

Discussion in 'Installation/Configuration' started by martinvidic, Jan 23, 2012.

  1. martinvidic

    martinvidic New Member

    Hi Everybody :)
    I'm new here - And new to dedicated hosting.
    Last week I learned a lot about ssh, apache, etc, and my hosting provider promised he would help me set up my domain so that it works as home/mydomain.com/www

    Unfortunately it looks like the know less than I :(
    I had to fix their mistakes in named.conf so that I can even start bind.

    I'm using webmin and terminal to set things up.
    It looks like bind is running now and i also added a virtual host in httpd.conf.
    However, it's still not working. In webmin I don't have the appache webserver option , dont know why.

    So this is what i did so far:
    Can anybody help me with this?
    this is my bind zone: flashmavi.com

    Code:
    $TTL 180
    @      86400    IN      SOA     ns1.flashmavi.com. [email protected] (
                    2008021501      ; serial, todays date+todays
                    86400           ; refresh, seconds
                    7200            ; retry, seconds
                    3600000         ; expire, seconds
                    86400 )         ; minimum, seconds
    flashmavi.com. 86400 IN NS ns1.flashmavi.com.
    flashmavi.com. 86400 IN NS ns2.flashmavi.com.
    ns1                     IN A 74.50.97.118
    ns2                     IN A 74.50.97.119
    flashmavi.com. IN A 74.50.97.118
    localhost.flashmavi.com. IN A 127.0.0.1
    
    And this is etc/httpd/conf/httpd.conf
    Code:
    NameVirtualHost *:80
    <VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot /home/flashmavi.com/www
        ServerName flashmavi.com
        ErrorLog logs/flashmavi.com-error_log
        CustomLog logs/flashmavi.com-access_log common
    </VirtualHost>
    When I type flashmavi.com, nothing happens
    THANX
    Martin
     
  2. visjusz

    visjusz New Member

    Domain configuration is ok: http://www.intodns.com/flashmavi.com

    You have problem with bind:
    Code:
    zone "flashmavi.com" {
            type master;
            allow-transfer {none;};
            file "/etc/bind/pri.flashmavi.com";
    };
    
    Code:
    $TTL        3600
    @       IN      SOA     ns1.flashmavi.com. asdasd.msg.com. (
                            2012012301       ; serial, todays date + todays serial #
                            7200              ; refresh, seconds
                            540              ; retry, seconds
                            604800              ; expire, seconds
                            86400 )            ; minimum, seconds
    ;
    
    flashmavi.com. 3600 A        74.50.97.119
    flashmavi.com. 3600      MX    10   mail.flashmavi.com.
    flashmavi.com. 3600      NS        ns1.flashmavi.com.
    flashmavi.com. 3600      NS        ns2.flashmavi.com.
    mail 3600 A        74.50.97.119
    www 3600 A        74.50.97.119
    
    AND run:
    /etc/init.d/bind9 restart

    then tell is working or not;)
     
  3. martinvidic

    martinvidic New Member

    Thanx, but i was asked for ns1 and ns2 IP addresses now.

    So i reinstalled bind and now i see pre-existing zones:
    Root Zone
    0
    0000::1
    127.0.0.1
    localhost
    localhost.localdomain

    I can't add a new master zone with webmin - because if I try, all the above zones create errors. so i guess its a problem with webmin. I also tried to delete the above zones.
    HOWEVER...
    This time I just edited the named.conf file and flashmavi.com.hosts through ssh. I can start bind now, but when i try to apply my zone flashmavi.com through webmin, I get:
    NDC command failed : rndc: connect failed: 127.0.0.1#953: connection refused
     
  4. martinvidic

    martinvidic New Member

    The whole named.conf looks like this:

    //
    // named.conf
    //
    // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
    // server as a caching only nameserver (as a localhost DNS resolver only).
    //
    // See /usr/share/doc/bind*/sample/ for example named configuration files.
    //

    options {
    listen-on port 53 { 127.0.0.1; };
    listen-on-v6 port 53 { ::1; };
    directory "/var/named";
    dump-file "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query { localhost; };
    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;

    /* Path to ISC DLV key */
    bindkeys-file "/etc/named.iscdlv.key";
    };

    logging {
    channel default_debug {
    file "data/named.run";
    severity dynamic;
    };
    };

    zone "." IN {
    type hint;
    file "named.ca";
    };

    include "/etc/named.rfc1912.zones";





    zone "flashmavi.com" {
    type master;
    allow-transfer {none;};
    file "/var/named/flashmavi.com.hosts";
    };
     
  5. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ls -la /etc/bind/
    ?
     

Share This Page