Solved

Virtual Web Servers in Apache

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CentOS7 Xvnc gdm login 9 227
Linux : when to add the entries in /etc/hosts file 22 99
Issue to mail 11 108
Set linux box as ip router 3 35
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

792 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