Reputation: 41
My existing wampserver (3.2) virtual hosts work fine, but when I try to add a new one I have problems. Any help apprecaited. I've added the new record to httpd-vhosts.conf:
#
<VirtualHost *:80>
ServerName newsite
DocumentRoot "c:/users/offic/onedrive - foldername/studio/domains/newsite"
<Directory "c:/users/offic/onedrive - foldername/studio/domains/newsite/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
and I've updated HOSTS (C:\Windows\System32\drivers\etc) to:
127.0.0.1 newsite
::1 new
(All the sites that work follow the above style) And I've restarted Windows and the DNS in Wampserver.
What actually happens when try to launch newsite in the browser is that it tries to download index.php rather than displaying it. I've also tried adding the new virtual hosts via wamp > localhost > add a new local host. I haven't altered http.conf. As I say, other sites are working fine. Thanks.
Upvotes: 0
Views: 694
Reputation: 41
So I removed the .htaccess file and things appear to work correctly. Another post said you have to use http://newsite/index.php but I get it fine with newsite/
Upvotes: 2