在使用的时候为了测试需要局域网访问so要配置下
<Directory />
AllowOverride all
# AllowOverride none
# Require all denied
Require all granted
</Directory>
<Directory "d:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
# Require local
Require all granted
</Directory>
加粗的是本体。
mysql数据库在不用的时候会自动退出登录这有点蛋疼所以需要对有效时间处理
session.gc_maxlifetime = 2147483647
这是按照秒来计时的, 默认是1440
修改wampserver 中的根目录
Wampserver安装好后,“www目录”默认为d:/wamp/www,也就是wampserver安装目录下的www文件夹。实际使用中,默认设置往往不是我们想要的,可能改成其他文件夹更适合我们。
1、
打开wamp/scripts/config.inc.php
找到 $wwwDir =“XXXX”
修改为:$wwwDir = ”你想要的路径“
$c_installDir是个变量,指WAMPserver安装根目录。
2、
修改Apache默认根目录
打开wamp/bin/apache/apache2.2.11/conf/httpd.conf,修改DocumentRoot后面双引号中的值为你所要的。
比如将DocumentRoot “D:/wamp/www/”
改成DocumentRoot “e:/xx/”
同时将<Directory “D:/wamp/www/“>
改成<Directory “e:/xx/“>
重启