![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
|
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.
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
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." |
|
|
|
|
|
#3 |
|
Programming Guru
![]() ![]() |
yup, that should do it.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#4 |
|
Expert Programmer
|
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 <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#5 |
|
Programming Guru
![]() ![]() |
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! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|