How to point to project index page by default in XAMPP

邮差的信 提交于 2019-12-08 08:48:26

When you edit the httpd-vhosts.conf file (which is in C:\xampp\apache\conf\extra), edit the DocumentRoot property accordingly.

Your current settings are probably looking like this:

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
    ServerName www.mywebsite.com
</VirtualHost>

which directs you to the main htdocs folder. In order to display your project, you use www.mywebsite.com/myproject. You should change the DocumentRoot. For example:

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/your-project-folder"
    ServerName www.mywebsite.com
</VirtualHost>

Tested on Win 8.1 Pro x64, XAMPP 5.6.21 portable. It's working.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!