开发者

XAMPP v1.7.4 installation issues,local host not working

I had an older version on XAMPP and it was working fine. I uninstalled it to install the new version.Since then local host has stopped working. XAMPP control panel says Apache and MySQL running.Can some one help please? I have got this in the httpd-vhosts.conf,do i make any changes here?

##<Vi开发者_如何学运维rtualHost *:80>
    ##ServerAdmin postmaster@dummy-host.localhost
    ##DocumentRoot "C:/xampp/htdocs/dummy-host.localhost"
    ##ServerName dummy-host.localhost
    ##ServerAlias www.dummy-host.localhost
    ##ErrorLog "logs/dummy-host.localhost-error.log"
    ##CustomLog "logs/dummy-host.localhost-access.log" combined
##</VirtualHost>

##<VirtualHost *:80>
    ##ServerAdmin postmaster@dummy-host2.localhost
    ##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
    ##ServerName dummy-host2.localhost
    ##ServerAlias www.dummy-host2.localhost
    ##ErrorLog "logs/dummy-host2.localhost-error.log"
    ##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>

Thank You


you can also fix it by editing your host file usually located in %systemroot%\system32\drivers\etc\hosts

first of all backup your hosts file

comment this line by adding # at the beginning of the line(if its already their)

#::1 localhost 

add this line in the end of the file

127.0.0.1       localhost

save it and restart your pc

if you face any problem just restore your hosts file


As you can access it using 127.0.0.1 and not 'localhost', locate httpd-vhosts.conf, usually in C:/xampp/apache/conf/extra/ and make sure you have the following listed as a virtual host:

  <VirtualHost *>
    DocumentRoot "C:\xampp\htdocs"
    ServerName localhost
  </VirtualHost>

Then restart Apache from the XAMPP control panel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜