国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > PHP > 正文

PHP錯誤:Forbidden You don't have permission to access / on this server

2024-05-04 21:53:45
字體:
來源:轉載
供稿:網友

 今天在測試一個php程序的時候,發現這個問題:

Forbidden

You don't have permission to access / on this server.
 

開始的時候我是用http://localhost/test.php進行的測試,沒有發現問題,后來要在內網測試一下就要用IP地址進行那個訪問了,如:http://10.10.50.195/test.php,就出現了這個問題。

后來咨詢了一下朋友(php高手),說修改一下php的配置文件httpd.conf。

在原有的位置文件中找到配置節

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>

修改成

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
#    Deny from all
    Allow from all

#允許所有訪問
    Satisfy all
</Directory>


還有

<Directory "D:/Wamp5/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 all

    #
    # Controls who can get stuff from this server.
    #
#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1

</Directory>

修改成

 

<Directory "D:/Wamp5/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 all

    #
    # Controls who can get stuff from this server.
    #
#   onlineoffline tag - don't remove
    Order Deny,Allow
#    Deny from all

#  Allow from 127.0.0.1
    Allow from all

</Directory>

然后保存,重啟服務,在訪問就解決了這個問題。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 余江县| 柞水县| 大埔区| 甘德县| 江津市| 大名县| 简阳市| 始兴县| 阿勒泰市| 绵竹市| 晋中市| 招远市| 监利县| 长沙市| 九龙县| 潜江市| 富顺县| 长兴县| 长汀县| 彩票| 名山县| 定结县| 横峰县| 湾仔区| 梨树县| 当雄县| 大宁县| 内乡县| 泾源县| 龙川县| 南澳县| 天峨县| 铜鼓县| 广州市| 乐陵市| 湘潭县| 昌平区| 孝昌县| 社旗县| 太康县| 苗栗县|