configuring virtual host and localhost redirecting to the xampp folder

后端 未结 5 721
慢半拍i
慢半拍i 2020-12-13 19:35

I have problem with creating virtual host. I am using Windows 7 x64 Professional. In file C:\\Windows\\System32\\drivers\\etc\\hosts I have only this lines:

5条回答
  •  别那么骄傲
    2020-12-13 20:01

    You need to enable name-based virtual hosting.

    Near the top of the file in C:\xampp\apache\conf\extra\httpd-vhosts

    uncomment #NameVirtualHost *:80

    i.e. from:

    #
    # Use name-based virtual hosting.
    #
    #NameVirtualHost *:80
    

    To:

    #
    # Use name-based virtual hosting.
    #
    NameVirtualHost *:80
    

    (Note the last line now is uncommented).

    Worked like a charm for me. :)

提交回复
热议问题