如何为不同的根目录配置Xampp Web服务器 [英] how to configuring a xampp web server for different root directory

查看:85
本文介绍了如何为不同的根目录配置Xampp Web服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Web目录是应用程序所有公共和静态文件的主目录.包括图像,样式表和JavaScript文件.这也是前端控制器的居住地.

The web directory is the home of all of your application's public and static files. Including images, stylesheets and JavaScript files. It is also where the front controllers live.

所以问题是当我安装并设置xampp时,我的Web目录是:

So the question is when i install and set up xampp my web directory is:

xampp\htdocs

我想将其设置为:

xampp\htdocs\myproject\web

该怎么做? 现在,当我在浏览器中键入地址时:http://localhost/
我进入xampp\htdocs目录
我想在浏览器中输入地址:http://localhost/
然后输入xampp\htdocs\myproject\web目录

How to do it? Now when I type in my browser the address: http://localhost/
I enter xampp\htdocs directory
and I want to type in my browser the address: http://localhost/
and enter xampp\htdocs\myproject\web directory

推荐答案

您可以通过单击(在xampp控制面板中)apache/conf/httpd.conf更改Apaches httpd.conf并调整DocumentRoot的条目和相应的Directory条目. 只需对"htdocs"使用 Ctrl + F 并将条目更改为新路径.

You can change Apaches httpd.conf by clicking (in xampp control panel) apache/conf/httpd.conf and adjust the entries for DocumentRoot and the corresponding Directory entry. Just Ctrl+F for "htdocs" and change the entries to your new path.

这篇关于如何为不同的根目录配置Xampp Web服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆