WAMP配置 --Version = 2.4.9

README : 记录下安装完WAMP后的配置,省的每次都百度。。。

配置外网访问

打开..\wamp\bin\apache\apache2.4.9\conf\httpd.conf配置文件,
Require localRequire all granted

// Apache ---> http.conf
<Directory "c:/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>

phpmyadmin外网访问

打开..\wamp\alias\phpmyadmin.conf配置文件,
Require localRequire all granted

Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"

# to give access to phpmyadmin from outside 
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#

<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    # Require local
    Require all granted
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
      Deny from all
      Allow from localhost ::1 127.0.0.1
    </IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

配置MySQL密码

  • WAMP的MySQL登陆密码默认为空,可以通过命令行自行修改:
    use mysql
    update user set password=PASSWORD('123456') where user='root';
    flush privileges; // 使修改生效
    quit
  • 打开..\wamp\apps\phpmyadmin4.1.14\config.inc.php配置文件,修改password即可
    $cfg['Servers'][$i]['password'] = '123456';
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容