Create a website but can't access to it

Discussion in 'Installation/Configuration' started by forethan, Feb 8, 2016.

  1. forethan

    forethan New Member

    Hi!
    I've got a raspberry pi 2+ with raspbian jessie lite on it.
    I've followed this tutorial :
    howtoforgeDOTcom/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/

    Everything's good.
    I can acces to phpmyadmin with mylocalip/phpmyadmin
    When i type mylocalip/ i can see my apache welcome page.
    When i type mypublicip/ i have an error connection time out.
    My router is forwarding the port 80 perfectly with my other webserver and my isp doesn't block the port 80.
    When i create a new website with mydomainDOTcom on ispconfig, eveything is ok.
    I then create an ftp user account with ispconfig3 and it's good too.
    But when i go to mydomainDOTcom i have on chrome/firefox an error connection time out
    Even if i reboot the server

    I've decided to creat this post because it's my 9th installation from blank sdcard!!!!

    Please help me.
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    So you're connecting from inside your local network/router - if you try from outside, connected to the public internet, does it work there? If so, see if your router can do NAT loopback (also called hairpinning); if it can't, see if you can setup your DNS to give out the local ip addr inside your local network, and the public ip to the rest of the world.
     
  3. forethan

    forethan New Member

    Hi! And thanks for answering to me.
    When i try to access to mypubliclip/ from 4g mobile (so outside my lan) = ERR_CONNECTION_TIMED_OUT
    When i try to acces to mypublicip/ from the lan = ERR_CONNECTION_TIMED_OUT
    When i try to acces to mydomaindotcom/ from the lan = ERR_CONNECTION_TIMED_OUT whereas i must have the default welcome page from ispconfig

    About the router:
    I've got another server on the same router(that i created months ago with a tuto from howtoforge) : Q6600 4gb ram and the only thing that i must do was forwarding some port on my router and everything works like a charm.
    I've done the same for the raspberry pi server but no success.
    I will try the ispconfig testscript from Till to see if it can help me.

    If you have another ideas, feel free to answer me.
    Thanks
     
  4. forethan

    forethan New Member

    here is the result but i don't know if it's good because i can't connect in root. Only use sudo always on raspbian:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    IP-address(es) (as per ifconfig): ***.***.***.***
    [INFO] ISPConfig is installed.
    [WARN] /usr/local/ispconfig/server/lib/config.inc.php is missing.

    ##### VERSION CHECK #####

    [INFO] php (cli) version is 5.6.17-0+deb8u1
    [INFO] php-cgi (used for cgi php in default vhost!) is version 5.6.17-0+deb8u1

    ##### PORT CHECK #####

    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening

    ##### MAIL SERVER CHECK #####

    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connecti
    ons you have to enable this.
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) con
    nections you have to enable this.

    ##### RUNNING SERVER PROCESSES #####

    [WARN] I could not determine which web server is running.
    [WARN] I could not determine which mail server is running.
    [WARN] I could not determine which pop3 server is running.
    [WARN] I could not determine which imap server is running.
    [WARN] I could not determine which ftp server is running.

    ##### LISTENING PORTS #####
    (seulement ()
    Adresse (distante)
    [anywhere]:995 (-)
    [localhost]:10024 (-)
    [localhost]:10025 (-)
    [localhost]:11211 (-)
    [anywhere]:110 (-)
    [anywhere]:143 (-)
    [anywhere]:111 (-)
    [anywhere]:21 (-)
    ***.***.***.***:53 (-)
    [localhost]:53 (-)
    [anywhere]:22 (-)
    [anywhere]:25 (-)
    [localhost]:953 (-)
    [anywhere]:993 (-)
    *:*:*:*::*:995 (-)
    *:*:*:*::*:10024 (-)
    *:*:*:*::*:3306 (-)
    [localhost]10 (-)
    [localhost]43 (-)
    [localhost]11 (-)
    *:*:*:*::*:8080 (-)
    *:*:*:*::*:80 (-)
    *:*:*:*::*:8081 (-)
    *:*:*:*::*:21 (-)
    *:*:*:*::*:53 (-)
    *:*:*:*::*:22 (-)
    *:*:*:*::*:25 (-)
    *:*:*:*::*:953 (-)
    *:*:*:*::*:443 (-)
    *:*:*:*::*:993 (-)




    ##### IPTABLES #####
     
  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    If you can't connect from the public side, I'd guess your router isn't forwarding port 80 to the right place, or is otherwise misconfigured. Do you have multiple public IP addrs, so port 80 on one addr goes to your other webserver, and port 80 on another add is supposed to go to ispconfig?
     
    forethan likes this.
  6. forethan

    forethan New Member

    I have one public ip static.
    And i have 2 server : one with a intel q660(i386) and one with arm(raspberry)
    My router is linksys wrt54g and forward port 80 for server 1 (192.168.1.101) and for server 2 (192.168.1.102)
    The server 1 works fine everywhere in the world.
    The server 2 shows default apache welcome page only if i request 192.168.1.102 in my lan. All the others request =err connection time out
    Even if i turn off server 1.
    The problem is the server 2.
    there's a problem somewhere : maybe config of <interface <apache2 <ispconfig
    I'm missing something but what??? :eek::eek:

    Edit: Now i turn off server 1, when i type my public ip, i can see the default apache welcome page...
    Edit2: no it was the server1 in cache!
     
  7. forethan

    forethan New Member

    This is the log if it can help :
    2016-02-09 00:37 serveur.XX.XX Debug Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    2016-02-09 00:37 serveur.XX.XX Debug Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
     
  8. forethan

    forethan New Member

    OK MY FRIEND! I'm so happy!!!! You were right about this messing router!
    You know what
    I forward the port 80 with 192.168.1.101 ok?
    And i forward too the port 80 with 192.168.1.102 ...
    And you know what: i desactivate the forwarding of the port 80 for the server 1(in the router)
    And magically my website appears.....
    I'm so noobish to doesn't know that we can't forward the same port with 2 ip!!!

    Is it a general rules or just my router which suxxx???

    :):):) HAPPY !!!!
     
  9. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    For basic port forwarding, you can only send a port (eg. 80) to a single inside server.

    You could use different ports to forward to the different servers, say port 80 forwards to .101, and port 88 forwards to .102, but then your url's for the second server will have to include that port (eg. http://www.blah.com:88/).

    If you can get a second IP address, you could forward port 80 on one address to .101, and port 80 on the other address to .102. That is also assuming your router is capable of doing that (many are, but very cheap routers may not.)

    Another option that uses a single ip address is to use a reverse http proxy, rather than basic port forwarding. Your http proxy would have to know what websites should be forwarded to .101 and what websites to .102, but it only needs the one IP address, and port 80 for everything. Again, a cheap router would not have that feature, and even many mid-level routers wouldn't either. If you have a spare PC, you could install pfSense on it and have a very capable firewall/router which could do that.
     
    forethan likes this.
  10. forethan

    forethan New Member

    Well,ok!
    Thanks again, now i can create others websites.
     

Share This Page