One server multiple sites problem

Discussion in 'Installation/Configuration' started by levviking, Sep 17, 2014.

  1. levviking

    levviking New Member

    Hi, i have a problem with my ISPConfig3.0.5.4p3+nginx+Centos6.5.
    I have static IP.
    After i follow the tutorial from here: http://www.howtoforge.com/perfect-server-centos-6.4-x86_64-nginx-dovecot-ispconfig-3
    I try to add 2 website in ISPConfig, i use the ISPConfig book: website1.com and website2.com .
    If i acces website1.com, it's say Can't acces this webpage.
    On the website2.com, same.
    If i acces my static IP adress, it's show me the website2.com
     
  2. Hello,
    You need to setup DNS in ISPConfig for your Websites, else your server can't be aware it has to display them.
    Nicolas
     
  3. srijan

    srijan New Member HowtoForge Supporter

    How did you added the websites, did you added them manually or through ISPConfig Webinterface?
    It is highly recommended to add the sites through ISPConfig webinterface.

    Check logs at /var/log/nginx/

    And you need to add proper DNS records
     
  4. levviking

    levviking New Member

    I set DNS with DNS Wizard, and my sites is added from ISPConfig interfaces.
     
  5. levviking

    levviking New Member

    In the /var/log/nginx/acces.log, i have the following error:

    127.0.0.1 [18/Sep/2014:03:20:02 +0300] "GET / HTTP/1.1" 200 3698 "-" "Mozilla/5.0 (ISPConfig monitor)" "-"
    and his is repeated on 144 lines.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not an error, its the opposite. This line shows that yor server is working as the ispconfig monitor is checking it every minute.
     
  7. levviking

    levviking New Member

    Thank you.
    But my problem isn't resolve yet.
    I try some video tutorials, but nothing helped me.
    I buy the book with ISPConfig, but it's not contain the tutorials, how to do from A to Z, and the order of config.
    For example:
    1, add the sites
    2, set up DNS with DNS wizard
    3, add FTP user
    4, add email adress
    5, create database
    etc..
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Adding a new website in ispconfig is really easy:

    1) Click on new website, enter the domain name in the domain field, press save.

    2) You want to use this domain as email address? Go to the mail module, add a new email domain and then a new mailbox.

    3) You host your own dns? Then go to the dns module, click to add a new dns domain with the wizard, enter the details like ip address and domain name into the fields and press save. If you use a subdomain of the same domain as ns records, then dont forget to add A-Records for the NS records as well.

    Have you checked if you setup the dns correctly, e.g. at intodns.com?
     
  9. levviking

    levviking New Member

    After i deactivate the website2.com, on my Ip fix adress it appear my website1.com site.
    But if i acces website1.com, it's nothing.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so the webserver is working and configured correctly as it must show the only active site when you use the IP.

    Then you should check the dns records of website1.com.
     
  11. levviking

    levviking New Member

    I have some errors, so i need to work with my DNS settings, maybe on server settings.
    Test results on intoDNS.com:

    Mismatched NS records WARNING: One or more of your nameservers did not return any of your NS records.

    DNS servers responded ERROR: One or more of your nameservers did not respond:
    The ones that did not respond are:xx.xxx.xxx.xx(My IP fix)

    Missing nameservers reported by your nameservers You should already know that your NS records at your nameservers are missing, so here it is again:

    ns.xx-yy.com.

    SOA record No valid SOA record came back!
    MX Error MX Records Oh well, I did not detect any MX records so you probably don't have any and if you know you should have then they may be missing at your nameservers!
    WWW Error WWW A Record ERROR: I could not get any A records for www.xxyy.com!

    (I only do a cache request, if you recently added a WWW A record, it might not show up here.)
     
  12. Hi,
    For sure your problem is with DNS.
    If you're using a Debian like distro (Ubuntu, ...), check that Bind is well listening on any port in /etc/bind/named.conf.options
    Code:
    	listen-on-v6 { any; };
    listen-on { any; };
    and restart bind
    Code:
    sudo service bind9 restart
    Check from another computer that DNS port are well opened on your server:
    Code:
    sudo apt-get install nmap
    nmap -sU -p53 xx.xxx.xxx.xx  <----- this is the most important test (UDP 53)
    nmap -PN -p53 xx.xxx.xxx.xx
    Once ports are OK, query DNS:
    Code:
    dig yourdomain.tld
    dig yourdomain.tld @xx.xxx.xxx.xx
    For sure, your domain has to be declared by a Registar and setup with your server DNS.
    Hope this helps.
     
    Last edited: Sep 18, 2014
  13. levviking

    levviking New Member

    I have Centos 6.5.
    I don't have bind folder in /etc

    I try to install the bind with yum, but it's already installed the 9.8.2 version.

    I run the nmap -sU -p53 xx.xxx.xxx.xx
    Here is the result:

    HTML:
    Starting Nmap 5.51 ( http://nmap.org ) at 2014-09-19 05:29 EEST
    Nmap scan report for plnt-shp.xx (xx.xxx.xxx.xx)
    Host is up (0.000049s latency).
    PORT   STATE  SERVICE
    53/udp closed domain
    
    Nmap done: 1 IP address (1 host up) scanned in 0.19 seconds

    And for nmap -PN -p53 xx.xxx.xxx.xx

    HTML:
    Starting Nmap 5.51 ( http://nmap.org ) at 2014-09-19 05:33 EEST
    Nmap scan report for plt-shp.xx (xx.xxx.xxx.xx)
    Host is up (0.000047s latency).
    PORT   STATE  SERVICE
    53/tcp closed domain
    
    Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds

    Command: dig xxxxx.xx

    HTML:
    ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> xxxxxx.xx
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 37895
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;xxxxx.xx.                     IN      A
    
    ;; Query time: 6 msec
    ;; SERVER: xxx.xxx.252.1#53(xxx.xxx.252.1)
    ;; WHEN: Fri Sep 19 05:35:49 2014
    ;; MSG SIZE  rcvd: 27
     
  14. It's clear that your server DNS can't be reached (UDP 53 closed).
    From your server, try to :
    Code:
    nmap -sU -p53 xx.xxx.xxx.xx
    It will tell if bind is running on localhost.
    If UDP 53 is opened on localhost, then the server's firewall is blocking access to it.
    (a quick Google search toid me that bind parameters in CentOS are in /etc/named.conf, check the 'listen' option in this file)
     
  15. levviking

    levviking New Member

    Thank you.

    HTML:
    Starting Nmap 5.51 ( http://nmap.org ) at 2014-09-19 11:58 EEST
    Nmap scan report for plant-shop.ro (84.232.235.31)
    Host is up (0.000039s latency).
    PORT   STATE  SERVICE
    53/udp closed domain
    
    Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds
    Here is the results.
    I'm new in Linux and server settings, thank you for helping me.
     
  16. levviking

    levviking New Member

    And this is the /etc/named.conf file:

    Code:
    //
    // 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 { any; };
            listen-on-v6 port 53 { any; };
            directory       "/var/named";
            dump-file       "/var/named/data/cache_dumb.db";
            statistics-file "/var/named/data/named_stats.txt";
            memstatistics-file "/var/named/data/named_mem_stats.txt";
            allow-query     { any; };
            recursion no;
            allow-recursion { none; };
    };
    logging {
            channel default_debug {
                    file "data/named.run";
                    severity dynamic;
            };
    };
    zone "." IN {
            type hint;
            file "named.ca";
    };
    include "/etc/named.conf.local";
     
  17. Airbag888

    Airbag888 New Member

    have you tried running dig yourdomain.tld @localhost you need to have a proper A record that sometimes the DNS wizard does not add.

    To see if it gets a response. Check your nameservers as well. What happens when you ping yourdomain.tld does it return the IP of your server?
     
    Last edited: Sep 19, 2014
  18. levviking

    levviking New Member

    I try command:
    dig perene.ro

    HTML:
    ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> perene.ro
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 1417
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;perene.ro.                     IN      A
    
    ;; Query time: 3 msec
    ;; SERVER: 193.231.252.1#53(193.231.252.1)
    ;; WHEN: Fri Sep 19 18:24:34 2014
    ;; MSG SIZE  rcvd: 27
    
     
  19. levviking

    levviking New Member

    I can't make it to work.
    After i disabled my second website, and try to install the Wordpress with my IP/wp-admin/install.php, i can't acces website, only the Backend.
    After i change the adress in WP Backend, from my IP adress to my website adress: perene.ro , i loose the contact with my sites.
     
  20. You seem to mix-up things about DNS.
    Lets talk about real thing else you won't get it running.

    The domain you want to be held by your server is : perene.ro
    Code:
    whois perene.ro
    
    % Whois Server Version 3.0 - whois.rotld.ro:43
    ...
    % Top Level Domain : ro
    % Maintainance : www.rotld.ro
    
      Domain Name: perene.ro
      Registered On: 2013-07-22
      Registrar: Hostvision SRL
      Referral URL: http://www.hostvision.ro
    
      Nameserver: ns.plant-shop.ro
    
      Domain Status: OK
    So when someone wants to access perene.ro, it is the server ns.plant-shop.ro that has to tell where to go.

    Code:
    ping ns.plant-shop.ro
    ping: unknown host ns.plant-shop.ro
    Code:
     dig plant-shop.ro ns
    
    ; <<>> DiG 9.9.5-3-Ubuntu <<>> plant-shop.ro ns
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40698
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 512
    ;; QUESTION SECTION:
    ;plant-shop.ro.			IN	NS
    
    ;; ANSWER SECTION:
    plant-shop.ro.		3599	IN	NS	dns2.host-vision.com.
    plant-shop.ro.		3599	IN	NS	dns1.host-vision.com.
    The above queries tell that ns.plant-shop.ro does not exists (so perene.ro is not reacheable).

    There are several ways to make it run, it depends on how you want your DNS to be managed.
    The easisest way is to use your ISPConfig.

    You could :
    - By host-vision.com (for plant-shop.ro domain), add a A entry for ns.plant-shop.ro
    - Then manage DNS for perene.ro with ISPConfig and ns.plant-shop.ro

    Hope this helps.
    Nicolas
     

Share This Page