ISPconfig NameServer and a second webserver

Discussion in 'ISPConfig 3 Priority Support' started by danhansen@denmark, Apr 13, 2015.

  1. danhansen@denmark

    danhansen@denmark Member HowtoForge Supporter

    Hi,

    I'm running the ISPconfig3 single server system on Ubuntu 14.04. I've been setting up a secind webserver for learning, but I'm not sure how to "forward" the siterequest to this new Apache2 webserver.
    The second server is as said, running Apache2 with "VirtualHost" so that I can use more than the default wbesite. My ISPconfig server is behind a firewall (NAT) but running using DMZ (which places it outside again, right). The second webserver is running behind NAT on IP 192.168.1.xxx because I need it internally only. But, I would like to test the domain from the outside, very much. I know I have to use another port for the this secont webser, e.g. port 89. and, then it would be possible to make a port forward in the router to the internal IP. But, how do I set it up in DNS in ISPconfig3 ??? This is what I'm not so sure about!?!?

    Looking forward to hear from you...

    KR
    Dan
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    DNS has no port settings, so there is no need to change anything related to the port in dns. You setup the dns record so that the domain points to the external IP of your router. You configure the router then to forward traffic from this external port to port 80 and the ip address of your new server.
     
    danhansen@denmark likes this.
  3. danhansen@denmark

    danhansen@denmark Member HowtoForge Supporter

    OK, great THANKS!!

    It sounds so right and so easy when you explain it ;)

    But, you mean port e.g. 85 right, because I cant use port 80. Cant have 2 servers running on port 80 right? Or is it possible when I'm making this forward in the router!?

    Studied 1001 pages ;)
    http://httpd.apache.org/docs/2.2/vhosts/examples.html
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    It works like this:

    Code:
    router:port 80 => server1:port 80
    router:port 85 => server2:port 80
     
  5. danhansen@denmark

    danhansen@denmark Member HowtoForge Supporter

    Hi,


    OK I think I get it now... So its not a portforward but a what we in the D-link family calls :

    Virtual Server
    The Virtual Server option allows you to define a single public port on your router for redirection to an internal LAN IP Address and Private LAN port if required. This feature is useful for hosting online services such as FTP or Web Servers.

    Lsiten for a port e.g. 85 and links to an ip and uses e.g. port 80 on that system. This may be very smart, because I'm running into a lot of user rights/problems when trying to use another port than the default port 80 on that second Apache2 webserver ;)

    BTW, do you have a nice tutorial for setting up virtualhosts on a Ubuntu Server/Apache2 webserver? I've been using this https://www.debian-administration.org/article/412/Hosting_multiple_websites_with_Apache2 , because I liked the idea of using /home/www/ for websites :) But there's a few things I'm suspecting being the reason for my problems ;)

    Thanks..
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

  7. danhansen@denmark

    danhansen@denmark Member HowtoForge Supporter

    I use ISPconfig for all websites, but I've added another webserver to learn by doing, you know... And I was very much in doubt how to run these 2 at the same time. And how to do it when the DNS implemented in ISPconfig3 controls all domains. It's just a second webserver to develop stuff like scripts, php funktions etc. But I needed to test some things from the outside or else I could just have used my host file to work on this second server.
    BTW it worked.:
    routerport 80 => server1port 80
    routerport 85 => server2port 80
    So actually I very satisfied ;) I was just wondering if you new about a tutorial which showed a newer way to make virtualhosts, than the one I showed above. If not, it's quite allright. I understand why, if you do not have such a ToDo ;)

    Thanks for the help ;)
     

Share This Page