Home  >  Article  >  Operation and Maintenance  >  apache configuration folder startup directory

apache configuration folder startup directory

王林
王林forward
2020-06-13 16:50:185362browse

apache configuration folder startup directory

配置文件夹启动目录的方法:

1、修改 httpd.conf 文件的配置

搜索下面两行代码:

DocumentRoot "${SRVROOT}/htdocs"
<Directory "${SRVROOT}/htdocs">

为保险起见,可以先把这两行代码注释,再复制下来。

2、然后把两行里的 ${SRVROOT}/htdocs 改成自己想要的路径,比如换成桌面路径 C:\Users\99659\Desktop  

DocumentRoot "C:\Users\99659\Desktop"
<Directory "C:\Users\99659\Desktop">

3、最后重启服务

此时我们用浏览器打开 localhost 或者127.0.0.1,这样就可以看到桌面上的文件夹了,而里面的文件也可以用服务打开了。

推荐教程:apache从入门到精通

The above is the detailed content of apache configuration folder startup directory. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:juejin.im. If there is any infringement, please contact admin@php.cn delete