上次把apache和MySQL都卸掉,重新安装了wampserver带来了不少的麻烦
1.以前练习时创建的数据库,都随这MySQL的卸掉,也都变成了空的数据库
2.数据库的密码,wampserver默认是空的,改回root有研究了大半天
今天有冒出问题了,我的网页内网访问不了了,apache的配置属性又从头设了一遍
Documentroot
Directory
AddType application/x-httpd-php .php .phtml .php3 .php4 .php5
AddType application/x-httpd-php-source .phps
最后,我连环境变量都改了,重启了电脑,还是不行,端口也试着换了,还是不行
实在没法了,在百度了搜了一个遍,解决方法如下:
设置:
1.允许外网访问apache
wamp 默认是禁止外网访问APACHE的,左键点击右下的wamp图标Apache - httpd.conf ,搜索关键字 "deny from ",会发现一处 "deny from"将其下的一行"Allow from 127.0.0.1" 之前加一个 #号,表示注释掉,新插入一行,手动输入Allow from all 。保存,重新启动下apache 服务就可以允许外网访问了。
2.apache, mysql 服务的开机自动运行
Windows - 开始? - 设置 - 控制面板 - 管理工具 - 服务,找到 wampmysqld, wampapache, 将 "启动类型" 由"手动" 改为"自动" 即可。
3.开启支持rewrite module
#LoadModule rewrite_module modules/mod_rewrite.so
去前面掉#,修改为
LoadModule rewrite_module modules/mod_rewrite.so
<Directory />
Options FollowSymLinks
AllowOverride None # 修改为AllowOverride All #
Order deny,allow
Deny from all
Satisfy all
</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.2/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:
# Options FileInfo AuthConfig Limit
#
AllowOverride None # 修改为AllowOverride All #
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
更多关于wampserver配置的信息,查看这里
http://hi.baidu.com/zzguo28/blog/item/389e61e788357a29b838203a.html