Solved

Virtual Web Servers in Apache

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

691 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