Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/local/psa/home/vhosts/scriptzine.nl/httpdocs/theme/default/global.php:1) in /usr/local/psa/home/vhosts/scriptzine.nl/httpdocs/theme/default/global.php on line 2
Script Zine, Webmaster help in English and Dutch!
Script Zine, webmaster help in English and Dutch
TUTORIALS SCRIPTS FORUM CONTACT
Tutorial pages:« 1 »
wmikke
Virtual hosts - Posted on: 27-01-2006 at 15:21

Admin

Zet voor het uitvoeren van dit artikel je Apache server uit

In dit artikel ga ik jullie uitleggen hoe je virtual hosts moet instellen.
Als je op je pc Apache hebt draaien dan moet je nu waarschijnlijk in je adresbalk intypen: http://localhost
Je kan het ook anders instellen, je kunt er bijvoorbeeld van maken http://wmikke . Dat ziet er toch een stuk leuker uit.

Als eerste moet je het bestand hosts opzoeken. Waar dit bestand staat verschilt een beetje per besturingssysteem.
In Windows 95/98/2000/Me staat dit bestand in de map C:Windows voor Windows XP is dit de map c:Windowssystem32driversetc

Als je het bestand hebt gevonden zul je zien dat je hem niet zomaar kan openen. Klik rechts op het bestand en kies bij open met voor Notepad/kladbok.

Als het bestand open is zul je dit tegen komen:

Quote hosts:
127.0.0.1 localhost

Dit is het standaard IP adres voor de localhost, je kunt hier net zoveel IP adressen inzetten als je maar wilt.

Voorbeeld:
Quote hosts:
127.0.0.1 localhost
127.0.0.1 jouwnaam


Nu moet je het bestand httpd.conf zien te vinden. Deze vindt je altijd in de map /conf/ in de directory waar jij Apache hebt geinstalleerd.

Als je httpd.conf hebt gevonden moet je het net zoals het bestand hosts openen in kladblok.
Ga naar de onderste regel van het bestand en zit dit er neer:

Code
1
2
3
4
5
6
7
8
9
10
11
12
NameVirtualHost *

<
VirtualHost *>
ServerName localhost
DocumentRoot c
:/apache/htdocs/
</
VirtualHost>

<
VirtualHost *>
ServerName jouwnaam
DocumentRoot c
:/apache/htdocs/jouwnaam/
</
VirtualHost>



Documentroot kan hier verschillen met jouw instellingen van de Apache server, dus controleer altijd waar jouw bestanden zich bevinden.

Als je nu Apache herstart en je typt in je adresbalk in http://jouwnaam dan zul je hetzelfde zien als dit http://localhost/jouwnaam/
Tutorial pages:« 1 »

Printable version

 
 

© Script Zine 2003-2010 - Script Zine Design - Hosting by: Mihosnet
Recommend: IE 6