Wamp virtual server
Met een beetje hulp van jullie ben ik er in geslaagd om een paar virual servers op mijn vaste pc in wamp te maken.
echter op mijn laptop lukt het maar niet.
Hier is een beetje gegevens van C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf.
Quote:
ServerName localhost:80
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/wamp/www/"
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "C:/wamp/www/"
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName amsac.local
DocumentRoot "E:/Dropbox/WebSites/one/amsac.be/"
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName janr.local
DocumentRoot "E:/Dropbox/WebSites/one/janr.be/"
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName telenet.local
DocumentRoot "E:/Dropbox/WebSites/telenet/"
</VirtualHost>
ServerName localhost:80
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/wamp/www/"
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "C:/wamp/www/"
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName amsac.local
DocumentRoot "E:/Dropbox/WebSites/one/amsac.be/"
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName janr.local
DocumentRoot "E:/Dropbox/WebSites/one/janr.be/"
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName telenet.local
DocumentRoot "E:/Dropbox/WebSites/telenet/"
</VirtualHost>
Ik hoop dat iemand me kan zeggen waarom ik altijd naar dezelfde site (localhost) gestuurd word.
Jan
127.0.0.1:8080
dan voer je in je url bijv localhost:8080 in
http://localhost/ kan je wel benaderen? Dan kom je in "C:/wamp/www/" ?
Je moet de vHosts wijzigen naar amsac.localhost enz. of allemaal toevoegen in je hosts file alszijnde
Je moet de vHosts wijzigen naar amsac.localhost enz. of allemaal toevoegen in je hosts file alszijnde
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/wamp/www/"
ServerName localhost
ServerAlias localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "E:/Dropbox/WebSites/one/amsac.be/"
ServerName amsac
ServerAlias amsac.local
ErrorLog "logs/amsac-error.log"
CustomLog "logs/amsac-access.log" common
</VirtualHost>
In Windows HOSTS bestand:
127.0.0.1 localhost
127.0.0.1 amsac.local
Dan Apache herstarten.
Gewijzigd op 23/06/2013 18:11:22 door - SanThe -
De tip van - SanThe - werkte.
Ik moest ook nog deze lijnen verwijderen.
Code (php)
1
2
3
4
2
3
4
<VirtualHost 127.0.0.1>
ServerName telenet.local
DocumentRoot "E:/Dropbox/WebSites/telenet/"
</VirtualHost>
ServerName telenet.local
DocumentRoot "E:/Dropbox/WebSites/telenet/"
</VirtualHost>
het hosts bestand was al ok :)
Het blijft echter de vraag waarom het wel werkte op de vaste pc maar niet op de laptop :(
Jan