Results 1 to 3 of 3

Thread: Web server network selection

  1. #1
    Join Date
    Feb 2013
    Beans
    3

    Web server network selection

    I'm running a small server hosting 2 websites with Apache2 on Ubuntu 12.10.

    The server has 2 network cards each connected to a different router. Each router has it's own internet connection, 1 personal and 1 business. I'd like to force webserver1 to use the personal internet connection and webserver2 to use the business internet connection for out going requests. I don't want webserver2 using my personal internet connection. Apache2 VirtualHosts for each webserver are set to listen on 2 different domains but how do I know that the outbound requests made by either server is using the proper network connection?

    Thanks

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,716
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Web server network selection

    You need to bind the virtual servers to the two network addresses like this.

    Code:
    <VirtualHost 10.10.10.10:80>
    [definition of virtualhost one]
    </VirtualHost>
    
    <VirtualHost 192.168.1.1:80>
    [definition of virtualhost two]
    </VirtualHost>
    You can put these in separate files in /etc/apache2/sites-available, or put them together into one file.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Feb 2013
    Beans
    3

    Re: Web server network selection

    Quote Originally Posted by SeijiSensei View Post
    You need to bind the virtual servers to the two network addresses like this.

    Code:
    <VirtualHost 10.10.10.10:80>
    [definition of virtualhost one]
    </VirtualHost>
    
    <VirtualHost 192.168.1.1:80>
    [definition of virtualhost two]
    </VirtualHost>
    You can put these in separate files in /etc/apache2/sites-available, or put them together into one file.
    Thanks I'll give that a shot.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •