0
我幾天前能夠成功登錄到我的EC2上的phpMyAdmin,但現在它給了我一個403禁止的錯誤。 我看過this帖子,this帖子,他們基本上建議允許從所有IP訪問。我已經完成了他們的建議,但這對我不起作用。無法訪問我的EC2 LAMP實例上的phpMyAdmin
我覺得出了什麼事,我可能是不正確的,但我做了,在過去的幾天之後,他們可能已經產生了影響: - 我下載了一個新的存取密鑰 - 我刪除了彈性與運行實例無關的IP地址 - 我刪除了一個NAT網關。
此刻,我phpMyAdmin.conf看起來是這樣的:
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
Alias /phpmyadmin /usr/share/phpMyAdmin
Alias /phpMyAdmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip <MyIP>
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from <MyIP>
Allow from ::1
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip <MyIP>
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from <MyIP>
Allow from ::1
</IfModule>
</Directory>
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>
#</IfModule>
我改變了一下這兩個職位以上的建議,然後重新Apache和MySQL,但什麼都沒有發生。它仍然顯示了403.請在這裏提供一些指導。
是什麼端口號碼?是像mysql一樣嗎? – omrakhur
您的網絡服務器端口(apache。例如:8080) –
允許使用 – omrakhur