apache - Why are all virtual hosts pointing to the first virtual host? -
after reinstalling development environment on windows 7 laptop subdomains pointing first virtual host in .conf file!?
hosts (c:/windows/system32/drivers/etc/hosts)
127.0.0.1 localhost 127.0.0.1 admin.localhost 127.0.0.1 api.localhost 127.0.0.1 cdn.localhost 127.0.0.1 demo.localhost 127.0.0.1 secure.localhost
httpd.conf
<virtualhost *:80> servername admin.localhost documentroot c:/wamp/www/admin </virtualhost> <virtualhost *:80> servername api.localhost documentroot c:/wamp/www/api </virtualhost> <virtualhost *:80> servername cdn.localhost documentroot c:/wamp/www/cdn </virtualhost> <virtualhost *:80> servername secure.localhost documentroot c:/wamp/www/secure </virtualhost>
all subdomains pointing first virtual host admin.localhost
..!? when requesting eg. http://cdn.localhost
dir c:/wamp/www/admin
showed?
i don't know i'm doing wrong in conf? setup worked before reinstallation... hmmm
this line should uncommented namevirtualhost *:80
restart apache after making changes
Comments
Post a Comment