Solved

Virtual Web Servers in Apache

Posted on 1997-03-01
1
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

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

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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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