Apache Virtual Hosts
HejJeg bøvler lidt med Virtual hosts i apache :)
NameVirtualHost *
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot C:\xampp\xampp\htdocs\site1
ServerName site1.localhost
ErrorLog logs/site1-access_log
CustomLog logs/site1-access_log common
</VirtualHost>
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot C:\xampp\xampp\htdocs\site2
ServerName site2.localhost
ErrorLog logs/site2-access_log
CustomLog logs/site2-access_log common
</VirtualHost>
Mapperne er oprettet!
og her er min hosts fil (eller noget af den :):
127.0.0.1 localhost
127.0.0.1 site1.localhost
127.0.0.1 site2.localhost
Men jeg får følgende fejl når jeg ser på localhost i browseren:
Bad request!
Your browser (or proxy) sent a request that this server could not understand.
If you think this is a server error, please contact the webmaster.
Error 400
localhost
08/02/05 13:32:40
Apache/2.0.54 (Win32) mod_ssl/2.0.54 OpenSSL/0.9.7g PHP/5.0.4