Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 machines.

Machine A is remote development server running, Ubuntu, Apache, PostGres, [Custom Java Application + Tomcat]

Machine B is local development server, running as VM. I have managed to copy the database and Java App. And every thing is working good so far.

Now I want to replicate the apache settings aswell. Here is where I am having issues. I am not really versed in apache maintenance so I am looking for pointers.

Machine A, has 3 IP based virtual hosts.

1.2.3.4 pointing to var/www/a1
1.2.3.5 pointing to var/www/a2
1.2.3.6 pointing to var/www/a3

As mentioned I am trying to do this locally in my network, so my server B IP is 192.168.0.x

How do I set it up so that I can access these websites locally? I tried to assign "free" IP addresses to websites but its not working. By free IPs I mean random guesses I know which arent being used in my local network........ I guess I just dont know where to go from here. There are also SSL certificates I need to install aswell.....I would need to read up on that after I get the initial apache working....so..Any help would be greatly appreciated.

Thanks

share|improve this question

1 Answer 1

I tried to assign "free" IP addresses to websites but its not working.

IP addresses are associated with interfaces not 'websites'. You should set IP aliases on your B server interface, for instance:

sudo ifconfig eth0:0 192.168.0.3 netmask 255.255.255.255 up
sudo ifconfig eth0:1 192.168.0.4 netmask 255.255.255.255 up
sudo ifconfig eth0:2 192.168.0.5 netmask 255.255.255.255 up
share|improve this answer
    
Thank you for the tip. I just stumbled upon this article which mentioned exactly that. I am going through it currently. debianadmin.com/… –  bcrawl Dec 12 '10 at 13:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.