morten444
asked on
WAMP Server: only working with first virtual host and 1 sub domain
Hi
I am in the process of moving 50 websites from IIS to WAMP
I am using Apache 2.0.58
I have created several virtual host in the httpd.com file and also in the host file
This is how it looks from the top:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# 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 *:80>
# ServerAdmin webmaster@dummy-host.examp le.com
# DocumentRoot /www/eadvice_demo
# ServerName eadvice.dk
# ErrorLog logs/eadvice.dk-error_log
# CustomLog logs/eadvice.dk-access_log common
#</VirtualHost>
<VirtualHost *:80>
ServerAdmin morten@e-advice.dk
DocumentRoot "C:\wamp\www\eadvice_demo"
ServerName eadvice.dk
ErrorLog "logs/eadvice-error.log"
CustomLog "logs/eadvice-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin NK25@tvind.dk
DocumentRoot "C:\wamp\www\videos"
ServerName pictures.nytaarskoncert-tv ind.dk
ErrorLog "logs/pictures-error.log"
CustomLog "logs/pictures-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin morten@e-advice.dk
DocumentRoot "C:\wamp\www\magleby"
ServerName magleby.dk
ErrorLog "logs/magleby-error.log"
CustomLog "logs/magleby-access.log" common
</VirtualHost>
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
Like this the www.eadvice.dk and the http://pictures.nytaarskoncert-tvind.dk WORKS OK
but www.magleby.dk shows the website for www.eadvice.dk
If i move www.magleby to the top of the virtual server list it will show magleby.dk even when i type www.eadvice.dk
Its like it will only display the first virtual host and virtual sub domain.
I hope someone can spot the error. I am sure its basic but I am just stuck
Regards
Morten
I am in the process of moving 50 websites from IIS to WAMP
I am using Apache 2.0.58
I have created several virtual host in the httpd.com file and also in the host file
This is how it looks from the top:
--------------------------
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# 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 *:80>
# ServerAdmin webmaster@dummy-host.examp
# DocumentRoot /www/eadvice_demo
# ServerName eadvice.dk
# ErrorLog logs/eadvice.dk-error_log
# CustomLog logs/eadvice.dk-access_log
#</VirtualHost>
<VirtualHost *:80>
ServerAdmin morten@e-advice.dk
DocumentRoot "C:\wamp\www\eadvice_demo"
ServerName eadvice.dk
ErrorLog "logs/eadvice-error.log"
CustomLog "logs/eadvice-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin NK25@tvind.dk
DocumentRoot "C:\wamp\www\videos"
ServerName pictures.nytaarskoncert-tv
ErrorLog "logs/pictures-error.log"
CustomLog "logs/pictures-access.log"
</VirtualHost>
<VirtualHost *:80>
ServerAdmin morten@e-advice.dk
DocumentRoot "C:\wamp\www\magleby"
ServerName magleby.dk
ErrorLog "logs/magleby-error.log"
CustomLog "logs/magleby-access.log" common
</VirtualHost>
--------------------------
Like this the www.eadvice.dk and the http://pictures.nytaarskoncert-tvind.dk WORKS OK
but www.magleby.dk shows the website for www.eadvice.dk
If i move www.magleby to the top of the virtual server list it will show magleby.dk even when i type www.eadvice.dk
Its like it will only display the first virtual host and virtual sub domain.
I hope someone can spot the error. I am sure its basic but I am just stuck
Regards
Morten
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Woops screwed that up with extra virtualhost tags, and got sniped anyway haha :D
ASKER
Hi
Thanks. That resolved the problem
Thanks
Thanks. That resolved the problem
Thanks
sorry rjdown ;)
Example:
<VirtualHost *:80>
ServerAdmin morten@e-advice.dk
DocumentRoot "C:\wamp\www\magleby"
ServerName magleby.dk
ServerAlias www.magleby.dk
ErrorLog "logs/magleby-error.log"
CustomLog "logs/magleby-access.log" common
</VirtualHost>