Solved

Virtual Web Servers in Apache

Posted on 1997-03-01
1
218 Views
Last Modified: 2011-09-20
I am running Linux kernel 2.0.12 and Apache 1.2 (I think the most current...) and I am trying to do virtual web hosting.  I have IP Aliasing built into my kernel, I have the DNS set up correctly, and I have this line in my /etc/rc.d/rc.inet1:

/sbin/ifconfig eth0 alias www.domain.com

The first problem is that when I boot I am getting a syntax error on ifconfig.  The second problem is that nothing else about this works either...  ;)
0
Comment
Question by:sdale
1 Comment
 
LVL 3

Accepted Solution

by:
sweston earned 100 total points
ID: 1584147
You don't want IP aliasing in your kernel.  You need to compile
dummy devices.  (Compile them as modules by answering M in the
make config for dummy drivers)  then after you make the kernel
do:

make modules
make modules_install

/sbin/insmod -o dummy0 /lib/modules/2.0.12/net/dummy.o
/sbin/ifconfig dummy0 192.168.0.1 -broadcast up
/sbin/route add -host 192.168.0.1 dummy0
/sbin/arp -s 192.168.0.1 01:02:03:04:05:06:07:08 -t ether pub

you need to replace "01:02:03:04:05:06:07:08" with the hardware
address if your ethernet card (this can be obtained with
ifconfig eth0)

replace 192.168.0 with your class C.

for an additional virtual server:
increment dummy0 to dummy1
increment your 192.168.0.1 to 192.168.0.2
(this is just a suggestion if you want to allocate a class C to
virtual domains).

You will also want to put this in your rc.local script so that
your dummy devices load everytime you boot.

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Running Guacamole on port 80 5 212
monitor and log every file access on redhat/linux 4 122
Linux SSH Error 9 116
Squid Authentication 7 69
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question