Fresh install getting Apache2 Ubuntu Default Page instead of index.html

Discussion in 'Installation/Configuration' started by Sheshman, May 22, 2020.

  1. Sheshman

    Sheshman Member

    Hi,
    First i've installed ispconfig 3.1 to a virtual machine and did tests, on vm it was working perfectly so i decided to install real machine to work with,
    installed on Ubuntu 16.04 following this article https://www.howtoforge.com/tutorial...pureftpd-bind-postfix-doveot-and-ispconfig/3/
    --Local ip of the server : 192.168.1.253
    --hostname : server1.gorsel.com
    --website : www.gorselpackaging.com
    --WAN ip : 176.236.23.86
    --all necessary ports are forwarded according to this article : https://www.faqforge.com/linux/whic...g-3-server-and-shall-be-open-in-the-firewall/
    --created dns zone for gorselpackaging.com(attached) on local sever
    --created ns1 & ns2 on godaddy (attached)
    --created website on local server (attached)
    As you know DNS resolving usually takes 4 hours to 48 hours, so waited 72 hours but when i ping www.gorselpackaging.com it says unknown host.
    I also realised when i call http://192.168.1.253 on browser, i see mostly Apache2 Ubuntu Default Page instead of ispconfig's default index.html, like it gets index.html 2 or 3 times over every 10 try.

    When i was installed the same domain to virtual machine version of mine, it took like 2 hours to DNS working, i mean after 2 hours i was able to ping and reach to site.

    The other thing makes me confuse, when creating DNS we should WAN ip instead of local but when creating web site should i choose local ip or wan ip? on virtual machine both were working without any problem, but which one is the right way?
    Since 72 hours left and www.gorselpackaging.com still unreachable, my htf_report as attached, what i'm doing wrong & where should i check to be sure everything is ok on ispconfig's side?

    I've also tried with fresh install on Ubuntu 18.04 and give it another 72 hours but outcome was the same.
    When i check ports throug http://www.ping.eu all ports seems reachable.
    out out of dig @localhost gorselpackaging.com:
    ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @localhost gorselpackaging.com
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 52918
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;gorselpackaging.com. IN A

    ;; Query time: 0 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri May 22 10:29:55 +03 2020
    ;; MSG SIZE rcvd: 48
    output of /usr/local/ispconfig/server/server.sh

    finished.
    iptables -L output :
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    f2b-dovecot-pop3imap tcp -- anywhere anywhere multiport dports pop3,pop3s,imap2,imaps
    f2b-pureftpd tcp -- anywhere anywhere multiport dports ftp
    f2b-postfix-sasl tcp -- anywhere anywhere multiport dports smtp
    f2b-sshd tcp -- anywhere anywhere multiport dports ssh

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    Chain f2b-dovecot-pop3imap (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain f2b-postfix-sasl (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain f2b-pureftpd (1 references)
    target prot opt source destination
    RETURN all -- anywhere anywhere

    Chain f2b-sshd (1 references)
    target prot opt source destination
    REJECT all -- 58.221.204.114 anywhere reject-with icmp-port-unreachable
    REJECT all -- 49.88.112.69 anywhere reject-with icmp-port-unreachable
    REJECT all -- 117.91.186.88 anywhere reject-with icmp-port-unreachable
    REJECT all -- 203.57.227.58 anywhere reject-with icmp-port-unreachable
    REJECT all -- 222.186.175.167 anywhere reject-with icmp-port-unreachable
    REJECT all -- 122.51.69.116 anywhere reject-with icmp-port-unreachable
    REJECT all -- elite-tracker.com anywhere reject-with icmp-port-unreachable
    REJECT all -- 118.24.82.81 anywhere reject-with icmp-port-unreachable
    REJECT all -- 222.186.180.8 anywhere reject-with icmp-port-unreachable
    REJECT all -- 204.48.25.171 anywhere reject-with icmp-port-unreachable
    REJECT all -- 106.13.22.60 anywhere reject-with icmp-port-unreachable
    REJECT all -- 123.207.218.163 anywhere reject-with icmp-port-unreachable
    REJECT all -- 124.127.206.4 anywhere reject-with icmp-port-unreachable
    REJECT all -- 128.199.95.161 anywhere reject-with icmp-port-unreachable
    REJECT all -- 222.186.175.169 anywhere reject-with icmp-port-unreachable
    REJECT all -- 92.190.153.246 anywhere reject-with icmp-port-unreachable
    RETURN all -- anywhere anywhere
    output of netstat -uap :
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    udp 0 0 *:40665 *:* 874/dnsmasq
    udp 0 0 server1.gorsel.c:domain *:* 874/dnsmasq
    udp 0 0 192.168.1.253:domain *:* 835/named
    udp 0 0 localhost:domain *:* 835/named
    udp 0 0 192.168.1.253:ntp *:* 1531/ntpd
    udp 0 0 localhost:ntp *:* 1531/ntpd
    udp 0 0 *:ntp *:* 1531/ntpd
    udp 0 0 *:ipp *:* 659/cups-browsed
    udp 0 0 *:mdns *:* 589/avahi-daemon: r
    udp 0 0 *:46626 *:* 589/avahi-daemon: r
    udp6 0 0 [::]:domain [::]:* 835/named
    udp6 0 0 fe80::c5db:d2ad:b56:ntp [::]:* 1531/ntpd
    udp6 0 0 fd0d:8c99:d018:0:3e:ntp [::]:* 1531/ntpd
    udp6 0 0 ip6-localhost:ntp [::]:* 1531/ntpd
    udp6 0 0 [::]:ntp [::]:* 1531/ntpd
    udp6 0 0 [::]:57631 [::]:* 589/avahi-daemon: r
    udp6 0 0 [::]:42081 [::]:* 874/dnsmasq
    udp6 0 0 [::]:mdns [::]:* 589/avahi-daemon: r
     

    Attached Files:

    Last edited: May 22, 2020
  2. nhybgtvfr

    nhybgtvfr Active Member

    firstly, using http://192.168.1.253 in a browser, you should ALWAYS get the default apache page.

    individual sites are resolved only by their domain names. if you have 20 sites on that servers ip, and you send a request to http://192.168.1.253 how is apache supposed to have any idea what site you wanted to see?

    secondly, i can't tell from the dns.png screenshot, as the name fields are truncating. do all those gorselpackaging.com entries have a trailing dot at the end of them? ie, gorselpackaging.com. otherwise bind will not see it as a complete domain and will append the domain onto it, so it will resolve as gorselpackaging.com.gorselpackaging.com.

    thirdly, since your using that same zone for the nameservers, you need glue records with your registrar, which you've done. and you need A records for ns1 and ns2 in your dns zone, which you're currently missing.

    dns entries for the publicly accessible domains should always use the public facing IP.
    if you need internal network access to those domains on their private ip's as well, you would need to configure split dns, which i'm not even sure ispconfig supports.
    also for newly created records, you shouldn't need to wait long for them to be accessible, assuming all your dns is configured properly. a query to a dns server for a newly created record it doesn't know about yet should get passed to a recursive dns server until it ultimately gets to the authoritative dns server which will either know about it, or the newly created record is incorrect.
     
  3. Sheshman

    Sheshman Member

    you are right, quick question what should i do to preview website from server's local ip i mean let's assume that i've two domains on the server abc.com and def.com should i call like http://192.168.1.253/abc/ or http://192.168.1.253/client/abc/, both didn't work :).
    yes they have.
    i was taking a look to vm server to find out what am i missing and i just realised i've created ns records ns1.server1.gsptech.com.(server's host name is gsptech.com) and ns2.server1.gsptech.com. instead of ns1.domainname.com & ns2.domainname.com, and when i look at the /etc/hosts i see this entry "192.168.1.16 gorselpackaging.com" which i don't have this entry at new server.
    If domain names resolving from ISPCONFIG's DNS system why should i add this line to hosts file? and if it's necessary why ispconfig doesn't add automatically (Just courious)
    great explanation for a rookie like me, thanks for your time.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Sheshman likes this.
  5. Sheshman

    Sheshman Member

  6. nhybgtvfr

    nhybgtvfr Active Member

    the hosts file on the server should contain records for the servers on that network, eg if you have 3 ispconfig servers:
    192.168.1.16 hostname1.domainname.tld hostname1
    192.168.1.17 hostname2.domainname.tld hostname2
    192.168.1.18 hostname3.domainname.tld hostname3

    it should not contain entries for individual websites.

    these entries are for the servers to be able to find each other, and for you to be able to connect between servers and install and configure ispconfig without requiring a fully configured and working dns zone, and for changes to propagate between ispconfig servers even if dns isn't working or doesn't exist.


    oh, and ispconfig doesn't add them to /etc/hosts automatically because they should already exist before ispconfig is installed. making sure that the hosts file on ALL servers, contains the correct entries for ALL servers should be one of the first steps in the installation process right after the OS installation itself.
     
    Last edited: May 22, 2020
    Sheshman likes this.
  7. Sheshman

    Sheshman Member

    DNS problem has been solved.
    What i did was change ns1.gorselpackaging.com & ns2.gorselpackaging.com to ns1.server's host name & ns2.server's host name, now i can ping and view web site on the browser, but i'm getting Apache2 Ubuntu Default Page when i call http://www.gorselpackaging.com
     
  8. Sheshman

    Sheshman Member

    ok it's solved when i restarted the server, right now it works.

    Thanks for your guidence guys.
     

Share This Page