Solved

Virtual Web Servers in Apache

Posted on 1997-03-01
1
216 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now