2 Replies - 1923 Views - Last Post: 26 May 2014 - 10:58 AM

#1 tom_burman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 11-December 12

Virtual Hosts not working XAMPP 1.8.3

Posted 26 May 2014 - 02:16 AM

Im trying to set up a virtual host using my local xampp stack but after following many tutorials i simply can't work out where im going wrong.

Here is what i added to my httpd-vhost.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot E:\Programs\xampp\htdocs
</VirtualHost>


<VirtualHost *:80>
DocumentRoot E:\Programs\xampp\htdocs\CVCMS
ServerName cvcms.dev

<Directory "E:\Programs\xampp\htdocs\CVCMS">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>


And here is my hosts file

# localhost name resolution is handled within DNS itself.
127.0.0.1       localhost
#   ::1             localhost
127.0.0.1   lmlicenses.wip4.adobe.com
127.0.0.1   lm.licenses.adobe.com
127.0.0.1   cvcms.dev


I have restarted apache after every change, i have made sure http.conf is linked to the httpd-vhosts file.

The issue is when i type in the domain cvcms.dev it shows the xampp splash page instead of the index.php in my cvcms folder.

Any ideas why?

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Virtual Hosts not working XAMPP 1.8.3

#2 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 671
  • View blog
  • Posts: 2,948
  • Joined: 03-December 12

Re: Virtual Hosts not working XAMPP 1.8.3

Posted 26 May 2014 - 08:24 AM

Have you deleted the xampp index page? Sounds like it is working correctly if you see the default page.
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5307
  • View blog
  • Posts: 27,200
  • Joined: 10-May 07

Re: Virtual Hosts not working XAMPP 1.8.3

Posted 26 May 2014 - 10:58 AM

After you edit your hosts file, issue the following with cmd (launch with admin privileges) : ifconfig /flushdns. From what I remember (xp & pre), flushing dns cache will pre-load cache with your hosts file. You should then be able to issue : nslookup cvcms.dev & verify it resolves to 127.0.0.1

You may also have positive results not using local host, but rather the ip of the nic (if it's using a locally assigned, non-routable subnet) or your external ip (if you are connecting directly to the modem).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1