標籤:Owner 沒有 oca 目錄 one color org amp important
把wamp配置到Azure上之後,倒騰好久都沒有解決403錯誤問題,網上百度了很多資料,差不多都是這樣修改的:
1、在C:wamp/bin/apache/apache2.4.9/conf目錄下找到“httpd.conf”檔案(建議先備份一下)
2、將“httpd.conf”下240行處的:
<Directory />
AllowOverride All
OptionsNone
Orderallow,deny
Deny from all
</Directory>
將其改為
<Directory"c:/wamp/apache2/cgi-bin">
AllowOverride All
OptionsNone
Orderallow,deny
Allow from all
</Directory>
但實際上在後面的版本中,這樣修改仍然會出現403錯誤,歸其原因有兩點:
1、2.5版本之後新增了一些命令;
2、單單配置這一個地方沒有用。
後來繼續查詢資料,然後多次嘗試之後發現這樣改可以解決問題:
將“httpd.conf”下240行處改為:
<Directory /> AllowOverride none Require all granted
</Directory>
將“httpd.conf”下約254行處改為:
<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就可以了。
Wamp2.5(Apache2.4.9)外網訪問403(Forbidden)錯誤