Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 13th, 2005, 10:25 AM   #1
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
Apache virtual servers

I have a server running off of a HP zt1000 laptop (1.5 mhz, 400 mb ram). But I need to run two websites off of it. I tried using the apache tutorial but I couldn't get it running. So, would someone please give me a tut on apache using lamens terms so that I can understand it? That would be great.
Indigno is offline   Reply With Quote
Old Dec 13th, 2005, 10:50 AM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
In section 3 of httpd.conf (Virtual Servers) insert the following:

Where example.com is your new domain name, and where WEB2 is the absolute path to the html directory for your new site. Then restart Apache Httpd.

NameVirtualHost EXAMPLE.COM:80
 
<VirtualHost EXAMPLE.COM:80>
ServerName www.example.com
DocumentRoot WEB2
</VirtualHost>
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Dec 14th, 2005, 9:05 AM   #3
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
yup, that should do it.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Feb 11th, 2006, 11:09 PM   #4
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Just keep in mind that all requests have to have the HTTP 1.1 url headers passed to Apache, so direct IP requests to access the site, or old HTTP 1.0 browsers will not work properly This is very rare to see now a days since vritual hosting is so common.

If you have the option you can also do IP based virtual hosting which works a lot better.
__________________
Clifford Matthew Roche &lt;geek@cliffordroche.com&gt;
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Old Feb 13th, 2006, 9:10 AM   #5
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
You can also do it like this:

NameVirtualHost *:80

<virtualhost *:80>
           server www.example1.com
           DocumentRoot /usr/blah
</virtualhost>

<virtualhost *:80>
           server  www.example2.com
           DocumentRoot /usr/blah
</virtualhost>
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:22 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC