如何解决WAMP中APACHE外部IP访问问题.docxVIP

  • 2
  • 0
  • 约2.06万字
  • 约 16页
  • 2019-02-09 发布于江苏
  • 举报
解决外部设备通过IP地址访问本地Apache服务器 在本地电脑上安装了WAMPSERVER2.5其中包含Apache(版本2.4.9)和php,在电脑上访问http://localhost可以进行,在手机上访问http://XXX.XXX.XXX.XXX(自己电脑IP地址) 却发现,直接提示403 Forbidden 解决方法:打开httpd.conf 它的默认路径: C:\wamp\bin\apache\apache2.4.9\conf 注意:打开之后,最好用一些编辑器打开,用记事本打开几乎不是人能看的 打开之后在Directory下修改 Directory / AllowOverride all Require all granted /Directory 添加以上信息,或者查找AllowOverride Require 将其都改为all 和 all granted ,亲测有效,要是懒得修改,直接拷贝复制以下信息吧 # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See URL:/docs/2.4/ for detailed information. # In particular, see # URL:/docs/2.4/mod/directives.html # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. Theyre here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the servers control files begin with / (or drive:/ for Win32), the # server will use that explicit path. If the filenames do *not* begin # with /, the value of ServerRoot is prepended -- so logs/access_log # with ServerRoot set to /usr/local/apache2 will be interpreted by the # server as /usr/local/apache2/logs/access_log, whereas /logs/access_log # will be interpreted as /logs/access_log. # # NOTE: Where filenames are specified, you must use forward slashes # instead of backslashes (e.g., c:/apache instead of c:\apache). # If a drive letter is omitted, the drive on which httpd.exe is located # will be used by default. It is recommended that you always supply # an explicit drive letter in absolute paths to avoid confusion. ServerSignature On ServerTokens Full # # ServerRoot: The top of the directory tree under which the servers # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk,

文档评论(0)

1亿VIP精品文档

相关文档