安装了最新的WAMP套装后,在本地可以正常访问,但是远程无法访问,提示:

apache 2.4.9 配置

翻了一下网上的攻略,发现2.4.9的Apache配置文件跟以前不太一样,默认httpd.conf里面需要把这里修改成Require all granted

apache 2.4.9 配置

重启服务,OK~


第二种:

<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>

wamp大约在253行


<Directory />

    AllowOverride none

    Require all granted

# 将Require all denied改为Require all granted

</Directory>

wamp大约在240行


配置虚拟主机

打开 apache\conf\extra  httpd-vhosts.conf 

通过ip访问

listen 8080

<VirtualHost 192.168.xx.xx:8080>

    DocumentRoot "C:/www"(网站目录)

    ServerName 192.168.xx.xx:8080

</VirtualHost>




通过域名访问

<VirtualHost *:8080> 

    DocumentRoot "C:/www" (网站目录)

    ServerName www.test.com   

</VirtualHost>

在C:\Windows\System32\drivers\etc找到hosts加入ip 域名

例如: 127.0.0.1 www.test.com



提示msvcp110.dll丢失的解决办法

下载vcredistx_x64

下载vcredistx_x86

看php版本对应,不是系统版本。


相关文章:

  • 2021-11-22
  • 2021-07-22
  • 2021-11-22
  • 2021-04-30
  • 2021-05-22
猜你喜欢
  • 2021-07-30
  • 2021-10-20
  • 2022-12-23
  • 2021-09-07
  • 2021-11-30
  • 2022-02-08
相关资源
相似解决方案