Announcement

Collapse
No announcement yet.

IP Aliases Kubuntu 13.10 w/ Apache 2.4

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    IP Aliases Kubuntu 13.10 w/ Apache 2.4

    Howdy All!
    In a weak moment, I installed 13.10 in hopes of getting somewhat of a head start on the next LTS release in June. My Mistake --and I need some assistance.

    I used 12.04 with a L.A.M.P. server, in a web dev. environment. Had roughly 20+ virtual hosts (sites) set up --Worked perfectly for 2-3 years. It was INCREDIBLY easy to add a virtual host via the network manager and the requisite Apache2 docs.

    In 13.10: The Apache 2.4 docs changed a bit -no problem. However, the network manager has changed such that I cannot get the virtual hosts to be recognized and maintain an internet connection. The virtual hosts are ONLY part of my intrAnet --a single NIC. I've tried disabling the network manager, via normal means (.conf file), to no avail and have edited network interfaces.conf to no avail.

    So, my question is really quite simple: In 13.10 how do I establish multiple virtual hosts -IP Aliases using a single NIC --either using solely the network manager gui or by editing config files.

    Please accept my thanks in advance.

    #2
    Network Manager and/or /etc/network/interfaces will allow you to configure multiple IP addresses on a single NIC so long as you aren't using DHCP. Can you describe in detail what you're doing?

    Comment


      #3
      SteveRiley

      Sorry for the delay in response. I pretty well described my attempts/wants in the original posting. Simply put, I'm trying to re-establish, on my local LAN, the virtual hosted sites I had in 12.04LTS (Apache 2.2) and am having a bear of a time getting the network manager to recognize and utilize IP aliases. I've tried editing the interface file directly --it too seems to fail in recognizing the IP aliases.

      I don't remember the details of setting up the intranet sites in early versions of Debian, and Ubuntu but, when I set up Kubuntu 12.04LTS I copied/saved all the config files for reference... Which, honestly hasn't been much help in 13.10. I do remember it was easier to set up IP based virtual sites than name based -but, I would not be opposed to using name based LAN sites: e.g.: web00.lan, web01.lan.

      This intrAnet set-up is used solely for localized website development prior to publishing on another hosting server.

      Thanks again for your help.

      Comment


        #4
        I need to know exactly how you're editing the file /etc/network/interfaces or trying to configure Network Manager.

        Comment


          #5
          /etc/network/interfaces
          Code:
          # The loopback network interface
          auto lo
          iface lo inet loopback
          
          ## address 127.0.0.1
          ## nemask 255.0.0.0
          
          ## The primary network interface
          auto eth0
          iface eth0 inet static
          address 192.168.0.03
          name Ethernet LAN card
          broadcast 192.168.0.255
          network 192.168.0.0
          gateway 192.168.0.1
          
          ### Web00
          auto eth0:0
          iface eth0:0 inet static
          name Ethernet LAN card
          address 192.168.0.50
          netmask 255.255.255.0
          broadcast 192.168.0.255
          network 192.168.0.0
          
          ### Web01
          auto eth0:1
          iface eth0:1 inet static
          name Ethernet LAN card
          address 192.168.0.51
          netmask 255.255.255.0
          broadcast 192.168.0.255
          network 192.168.0.0
          This worked in previous releases ---BUT, I found it easier in 12.04 to use the Network manager exclusively to add IP aliases.
          also disabled Network Manager /etc//NetworkManager/NetworkManager.conf

          Network Manager in 13.10: Honestly, I think I've tried about every configuration that seems appropriate but the end result either don't work at all, or upon reboot, throws an error/warning message concerning network configuration. DHCP is handled by router. I wish I could remember the exact steps taken in 12.04 to add an alias but... The gui in 13.10 has many more choices in configuring and I'm reasonably certain I'm not using the proper segment.

          As I mentioned, I've tried "adding a connection (VLAN) and editing the exiisting connection by adding routes --automatically and manually. More or less grasphing at straws.

          If it helps... Until this install I've always had my dev. server as an autonomous machine and used Samba to edit files, and was able to connect to each site via http://192.168.0.xxx, This particular install began life as 12.04 a few years ago and the server was on this same machine and worked equally as well --even easier since Samba wasn't involved. The other linux box was used as a second household machine... No Windows here.

          Thanks

          Comment


            #6
            Try removing the :n alias specifiers. ifup and ifdown now call the ip utility rather than ifconfig. ip does not support the older alias method; instead, you simply repeat the device name with each additional assigned IP address. More info is on the Debian wiki page about configuring network interfaces.

            Also, you should strive for simplicity. When configuring basic /24 networks, you don't need the broadcast and network options. The IP stack can figure these out on its own from the provided address and netmask options (you're missing a netmask in the first definition besides). Also also, interfaces now understands CIDR addressing, so you can omit the netmask option and provide a complete definition in one address line. Also also also, don't put leading zeros after periods in IP address (see the ".03" in your first address). This is not RFC compliant.

            With all that, your /etc/network/interfaces can be reduced to
            Code:
            auto eth0
            iface eth0 inet static
              address 192.168.0.3/24
              gateway 192.168.0.1
            
            iface eth0 inet static
              address 192.168.0.50/24
            
            iface eth0 inet static
              address 192.168.0.51/24
            Last edited by SteveRiley; Jan 31, 2014, 11:15 PM.

            Comment


              #7
              Steve;
              Still, the simple edits to "interfaces" produce nothing more than error messages a log-on or when trying to shut the machine down.

              I'm beginning to think this problem may be a 13.10 unique problem or, perhaps, unique this particular installation** --as the other machines (3 x 12.04) in this office produce predictable results. The machine in question here is a production machine, not easily -or quickly reverted due to time constraints so, I will wait until the next LTS version becomes available before pursuing this any further.

              **We've had some other "phantom" problems with this install -particularly with KATE. Kate seems not to like user created snippets and has deleted our work related snippets on a whim. The first time, I thought it was an errant "delete this" on my part --the second and third time it happened --Pure Kate. Needless to say, I use Geany now. A second phantom concerns the arbitrary changing of the desktop wallpaper. May be set and operate for days at a time, then one morning, at first boot, the thing seems to think it prefers the previous wallpaper more and reverts itself to that image... Spooky.

              These are not "junker" machines --all are HP Workstations with an overload of RAM and mediocre graphics cards (NVIDIA).

              T hanks for your time and efforts here.

              Comment


                #8
                Originally posted by Gramps View Post
                **We've had some other "phantom" problems with this install -particularly with KATE. Kate seems not to like user created snippets and has deleted our work related snippets on a whim. The first time, I thought it was an errant "delete this" on my part --the second and third time it happened --Pure Kate. Needless to say, I use Geany now. A second phantom concerns the arbitrary changing of the desktop wallpaper. May be set and operate for days at a time, then one morning, at first boot, the thing seems to think it prefers the previous wallpaper more and reverts itself to that image... Spooky.
                Kate doesn't delete files on its own, and wallpaper doesn't change without being told to. That machine is operating strangely. I recommend rebuilding it.

                Comment

                Working...
                X