修改默认网站目录
1.修改httpd.conf
查找: DocumentRoot "c:/wamp/www/"
修改: DocumentRoot "d:/www/"
查找: <Directory "c:/wamp/www/">
修改: <Directory "d:/www/">
2.wampserver原先的index.php的修改
查找:
//chemin jusqu'au fichier de conf de WampServer
$wampConfFile = '../wampmanager.conf';
//chemin jusqu'aux fichiers alias
$aliasDir = '../alias/';
修改:
//chemin jusqu'au fichier de conf de WampServer
$wampConfFile = 'c:/wamp/wampmanager.conf';
//chemin jusqu'aux fichiers alias
$aliasDir = 'c:/wamp/alias/';
第三步:修改manage.ini和manage.tpl
打开:manage.ini
查找:Type: item; Caption: "www 目录"; Action: shellexecute; FileName: "c:/wamp/www/"; Glyph: 2
修改:Type: item; Caption: "www 目录"; Action: shellexecute; FileName: "e:/web/"; Glyph: 2
打开:manage.tpl
查找:Type: item; Caption: "${w_wwwDirectory}"; Action: shellexecute; FileName: "${wwwroot}"; Glyph: 2
修改:Type: item; Caption: "${w_wwwDirectory}"; Action: shellexecute; FileName: "e:/web"; Glyph: 2
wampserver虚拟主机的设置:
httpd.conf,
#Include conf/extra/httpd-vhosts.conf,
把前面的#去掉
httpd-vhosts.conf
加上
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
阿里云windows服务器:
要加上二级域名的域名解析:(与www解析一样)
xxx.xxx.com到阿里云的主机IP,可以添加xxx的二级域名(主机记录),选择A记录后,设置IP为阿里云的IP即可(主机记录值);
本地服务器:(127.0.0.1):
在C:\windows\System32\drivers\etc中的hosts文件添加记录:
127.0.0.1 xxx.xx.com