multiple IP getting apache welcome page

Discussion in 'Installation/Configuration' started by ariban99, Mar 25, 2020.

  1. ariban99

    ariban99 Member

    Hi
    I am using ispconfig 3.1
    i have a block of 5 public ip's, i set them each in settings server ipv4
    then i went to my websites and changed each one from * to the public IP i want. now all my website are getting the apache welcome page instead of my website.
    i changed it all back to * meanwhile.
    what am i doing wrong? i read somewhere each public IP has to have a private IP, does that mean i need a separate ispconfig virtual server per each public IP to run that website?
    Thank you
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    This should be well covered in the manual, but you would set the public ip in IPSConfig if your ISPConfig server has public ip addrs; if your server has private ip addrs and you use nat/forwarding from a router, you must set private ips in ISPConfig. Ie. you have 5 public ip addrs on your router, and 5 private ip addrs on your server, a forward setup for each. You configure which private ip a website should use based on the public ip which forwards to it.

    And for when you get to the question, in your (public) DNS, you specify the public ip addrs.
     
  3. ariban99

    ariban99 Member

    Hi
    I have the manual 3 pdf
    i read 4.9.2.3 Server IP addresses and followed the instructions
    but it doesn't say anything that you mentioned.
    I set the public ips in system> server IP address. there was 1 ip from my local lan 192.168.1.23
    my server is behind pfsense firewall with ONE local IP only. 192.168.1.23
    i have 5 public ips (1 plus 4 virtual IP in pfsense)
    my dns is with google domains, and its pointing to one of the public ips that i want to use for this scenario
    when i go to sites and select * it works perfectly as the ip
    if i select one of the 5 public ip that i entered, then i get the error page of apache.
    what am i missing?

    my server is centos 7 ispconfig 3.1
    my pfsense firewall has 80,443 opened and forwarding to 192.168.1.23 from all 5 public IP addresses
     
  4. Steini86

    Steini86 Active Member

    Set it to the local IP (192.168.1.23)
    This setting is to configure the IP addresses of that particular host. As I understood, your server has only one ip address, so set this one. Sometimes servers are in two different LAN with different network cards and then it has to be specified on which IP the server listens. This does not apply to you.

    Your server has only one IP
    Your Router/Firewall has 1+4 IPs but that is a different thing
     
  5. ariban99

    ariban99 Member

    sorry when you say set it to the 192.168.1.23, what do you mean? set what?
    and how do i set different IP to different websites?
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Delete those. That is where you specify additional ip addresses which are on your server; in your case, they would be private ip addrs if you had any (and you said you do not, only a single ip addr on the server).

    So leave it in a working configuration, with '*' as the ip address. Or use 192.168.1.23 for the ip address of all sites.

    The ip address set for a website is where the web server (apache/nginx) is configured to listen for requests for the site - it must be an ip address which exists on your server. Your server has only one ip address, 192.168.1.23. You must either select your server's only ip address (192.168.1.23) or use '*'.

    Why is it you think you should change that? If '*' is working for you, why do you think you should use something else? There are (less common) scenarios where that is useful, but you don't have one.

    Re-read it a couple times, it clearly says:
    I do agree that section 4.6.1.1 doesn't clarify this (public vs. private), and you have to read between the lines in the IPv4-Address section to pick it out. You could file a documentation issue in the tracker to make that more clear, or even add a little sub-section for NAT/forwarding setups to clarify things.
     
  7. ariban99

    ariban99 Member

    i see, so i simply update my google domain DNS to the public IP i want and then set my firewall to forward 443 and 80 to my one internal IP 192.168.1.23
    this makes sense, and i hope i am getting it correct now
     

Share This Page