configuring virtual host and localhost redirecting to the xampp folder

后端 未结 5 702
慢半拍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:02

    I had this same issue. Your first request is redirecting to the htdocs root directory. If you look at index.php in the htdocs directory, you can see very brief code that takes the incoming request and redirects it to the xampp directory.

    I fixed it by fiddling with the httpd-vhosts.conf file. In your case, try making the following edits:

    NameVirtualHost 127.0.0.1
     
        DocumentRoot "C:\xampp\htdocs\
        ServerName localhost
    
    
     
        DocumentRoot "C:\Users\Me\Dropbox\Project\public"
        ServerName www.myhost
        ServerAlias www.myhost
        
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Order allow,deny
            Allow from all
       
    
    

提交回复
热议问题