自定义网站根目录

修改httpd.conf里的DocumentRoot和Directory改为指定路径

配置文件的修改需要重启生效

验证:在指定路径的文件夹下建立一个PHP文件,内容<?php echo "success";?>

访问该文件,测试是否成功。

注意www目录并没有更改,以下更改www目录的方法:找到wampmanager.ini文件并打开,找到menu.left,修改www目录的名称和指定路径,找到wampmanager.tpl文件并打开,找到menu.left,修改w_www.directory为指定名称,路径为指定路径。重启生效

时间: 2024-08-07 17:19:43

自定义网站根目录的相关文章

自定义网站根目录、多站设置(未确定是否支持其他版本)

自定义网站根目录三个步骤: 注:路径与自己在硬盘中设置的路径一致 第一: 打开httpd.conf文件,Ctrl+f搜索documentroot和directory,修改为自己想要的路径: 第二: WAMPServer3.0.6 64bit中Apache的httpd.conf文件是默认包括了httpd-vhosts.conf(路径:wamp64\bin\apache\apache2.4.18\conf\extra)扩展文件中的一些配置,因此也要将httpd-vhosts.conf扩展文件中的配置

PHP自定义网站根目录

1.打开httpd.conf配置文件(xampp下apache文件夹中的conf里) Ctrl + F 查找documentroot 找到结果 改好后保存,并重启apache

wampsever自定义站点根目录,多站点配置,自定义端口号

1.自定义站点根目录 点击apache 搜索DocumentRoot,更改目录 以及<Directory  "f:/www">处的目录 点击www 返回上一级文件 打开wampmanager.ini文件,搜索menu.left,找到“www目录”,改名为Demo(其他名字也可以),并修改路径. 打开wampsever.tpl文件,搜索menu.left,找到“w_wwwDirectory”,改名为“Demo目录”,并修改路径(如F:/Demo),保存并重启服务. 2.多站点

svn文件同步到web服务器,即同步到网站根目录

进入到hooks目录 [[email protected] default]# cd /opt/svn [[email protected] svn]# ll total 4 drwxr-xr-x 6 root root 4096 Feb 24 06:38 repos [[email protected] svn]# cd repos [[email protected] repos]# ll total 24 drwxr-xr-x 2 root root 4096 Feb 24 07:47 c

js获取网站根目录

<script type="text/javascript"> function getRootPath() { var strFullPath = window.document.location.href; var strPath = window.document.location.pathname; var pos = strFullPath.indexOf(strPath); var prePath = strFullPath.substring(0, pos);

Nginx网站根目录更改及导致403 forbidden的问题解决

最近因为工作需要,要将Nginx网站根目录更改下,通过网上的一些教程更改后,但发现测试的时候一直提示403 forbidden错误,后台通过一个朋友的提示也解决了,所以现在将详细的步骤分享给大家,有需要的朋友们可以参考学习. 一.更改根目录 Nginx默认网站根目录为/usr/local/nginx/html,要将它改成/home/fuxiao/www 更改方法: ? 1 vi /usr/local/nginx/conf/nginx.conf 将其中的 ? 1 2 3 4 location /

Tomcat中更改网站根目录

原文http://www.codesec.net/view/401617.html 1.tomcat原来的默认根目录是http://localhost:8080,如果想修改访问的根目录,可以这样: 找到tomcat的server.xml(在conf目录下),找到: 复制代码 代码如下: <Host name="localhost" appBase="webapps"       unpackWARs="true" autoDeploy=&q

更改nginx网站根目录

默认网站根目录为/usr/local/nginx/html,要将它改成/homw/www vi /usr/local/nginx/conf/nginx.conf 将其中的 location / { root   html; index  index.php index.html index.htm; } 改为 location / { root   /home/www; index  index.php index.html index.htm; } 然后再将 location ~ \.php$

wamp环境网站根目录更改

1.修改wampserver的默认目录 安装好wampserver后,网站根目录默认为:安装目录\wamp\www,也就是wampserver安装目录下的www文件夹. 我们以更改为:D\www为例. 打开wamp\scripts\config.inc.php 第47行,$wwwDir =$c_installDir.’/www’;( $c_installDir是个变量,指WAMPserver安装根目录.) 修改为:$wwwDir ='D:/www';即可. 第2步 2.修改Apache默认根目录