67
Mới! Lưu câu hỏi hoặc câu trả lời và sắp xếp nội dung yêu thích của bạn. Tìm hiểu thêm.
Learn more.
Xin chào, tôi đã cài đặt phpmyadmin trên máy centos của mình và khi tôi cố gắng nhấn
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
2 thông qua trình duyệt của tôi, tôi gặp lỗi này:Forbidden
You don't have permission to access `phpmyadmin` on this server.
Tệp
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
3 của tôi có nội dung sau:# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
Vui lòng giúp tôi giải quyết vấn đề này. Bất kỳ khách hàng tiềm năng được đánh giá cao.
Cảm ơn
Hỏi ngày 23 tháng 4 năm 2014 lúc 5:20Apr 23, 2014 at 5:20
Megha Sharmamegha SharmaMegha Sharma
2.1358 Huy hiệu vàng26 Huy hiệu bạc31 Huy hiệu Đồng8 gold badges26 silver badges31 bronze badges
8
Không có cấu hình nào ở trên hoạt động cho tôi trên máy chủ Centos 7 của tôi. Sau nhiều giờ tìm kiếm, đó là những gì làm việc cho tôi:
Chỉnh sửa tệp phpmyadmin.conf
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
4Và thay thế nút
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
5 hiện tại bằng các mục sau:
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
Đã trả lời ngày 30 tháng 3 năm 2015 lúc 19:30Mar 30, 2015 at 19:30
7
Trên một cài đặt mới trên centos7, tôi đã thử các phương thức trên [chỉnh sửa phpmyadmin.conf và thêm yêu cầu được cấp], nó vẫn không hoạt động. Đây là giải pháp: Cài đặt mô -đun
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
6:$ sudo yum install php
Sau đó, khởi động lại httpd:
$ sudo systemctl restart httpd
và Voila !
Đã trả lời ngày 21 tháng 4 năm 2015 lúc 10:35Apr 21, 2015 at 10:35
6
Bạn cần làm theo các bước sau:
Tìm dòng đọc theo sau
Require ip 127.0.0.1
Thay thế bằng địa chỉ IP máy trạm của bạn:
Require ip 10.1.3.53
Lại tìm dòng sau:
Allow from 127.0.0.1
Thay thế như sau:
Allow from 10.1.3.53
Cũng tìm
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
7 và nhận xét nó trong toàn bộ tập tin.Lưu và đóng tệp .________ 28:
# service httpd restart
EDIT: Vì đây là câu trả lời được chọn và có khả năng hiển thị tốt nhất ... Vui lòng đảm bảo rằng PHP được cài đặt, nếu không bạn sẽ gặp lỗi
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
9.make sure
that PHP is installed, otherwise you get same
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
9 error.
adriantnt
3.3645 Huy hiệu vàng27 Huy hiệu bạc35 Huy hiệu Đồng5 gold badges27 silver badges35 bronze badges
Đã trả lời ngày 23 tháng 4 năm 2014 lúc 12:20Apr 23, 2014 at 12:20
Megha Sharmamegha SharmaMegha Sharma
2.1358 Huy hiệu vàng26 Huy hiệu bạc31 Huy hiệu Đồng8 gold badges26 silver badges31 bronze badges
7
Không có cấu hình nào ở trên hoạt động cho tôi trên máy chủ Centos 7 của tôi. Sau nhiều giờ tìm kiếm, đó là những gì làm việc cho tôi:
# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
0
Chỉnh sửa tệp phpmyadmin.confOct 12, 2014 at 16:09
Và thay thế nút
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
5 hiện tại bằng các mục sau:wrrĐã trả lời ngày 30 tháng 3 năm 2015 lúc 19:301 silver badge1 bronze badge
3
Trên một cài đặt mới trên centos7, tôi đã thử các phương thức trên [chỉnh sửa phpmyadmin.conf và thêm yêu cầu được cấp], nó vẫn không hoạt động. Đây là giải pháp: Cài đặt mô -đun
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
6:# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
1Sau đó, khởi động lại httpd:
và Voila !
Đã trả lời ngày 21 tháng 4 năm 2015 lúc 10:35Feb 21, 2015 at 12:58
Bạn cần làm theo các bước sau:emotality
Tìm dòng đọc theo sau4 gold badges38 silver badges60 bronze badges
4
Thay thế bằng địa chỉ IP máy trạm của bạn:
# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
2Lại tìm dòng sau:
# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
3Thay thế như sau:
Cũng tìm
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
7 và nhận xét nó trong toàn bộ tập tin.Lưu và đóng tệp .________ 28:
EDIT: Vì đây là câu trả lời được chọn và có khả năng hiển thị tốt nhất ... Vui lòng đảm bảo rằng PHP được cài đặt, nếu không bạn sẽ gặp lỗi
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
9.Aug 27, 2014 at 4:34
2
adriantnt
3.3645 Huy hiệu vàng27 Huy hiệu bạc35 Huy hiệu Đồng
Đã trả lời ngày 23 tháng 4 năm 2014 lúc 12:20
Để cho phép tất cả:Feb 10, 2016 at 21:33
Đã trả lời ngày 12 tháng 10 năm 2014 lúc 16:09Alvin Bunk
WRRWRR3 gold badges28 silver badges43 bronze badges
Huy hiệu bạc 1331
# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
4Chỉnh sửa tệp:
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
4 và thay thế của bạn bằng sau:# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
5Khởi động lại Apache:
$ sudo yum install php
1[Phpmyadmin v4.0.10.8]Jul 18, 2019 at 8:37
Đã trả lời ngày 21 tháng 2 năm 2015 lúc 12:58
# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
6Emotalityemotality
# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
712.6K4 Huy hiệu vàng38 Huy hiệu bạc60 Huy hiệu ĐồngSep 18, 2019 at 13:33
Đầu tiên chỉnh sửa tệp /etc/httpd/conf.d/phpmyadmin.conf và thêm dòng bổ sung vào cài đặt thư mục:Faisal Naseer
Nếu bạn muốn cho phép truy cập vào mọi người thì bạn có thể thay đổi nó thành:1 gold badge34 silver badges55 bronze badges
Cho phép trong tất cả các phần của tập tin.
Khởi động lại [dịch vụ httpd khởi động lại] là đủ để chọn điều này.Sep 17, 2016 at 8:58
Tôi đã tìm thấy điều này sau 2 ngày nghiên cứu nghiêm ngặt, [tìm thấy nó ở đây] và làm việc phù hợp với tôi.
Đã trả lời ngày 27 tháng 8 năm 2014 lúc 4:34
Vấn đề với câu trả lời với nhiều phiếu bầu nhất là nó không giải thích lý do cho giải pháp.
# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
8Đối với các dòng
$ sudo yum install php
2, thay vào đó, bạn nên thêm địa chỉ IP của máy chủ có kế hoạch truy cập phpmyadmin từ trình duyệt. Ví dụ $ sudo yum install php
3. $ sudo yum install php
2 cho phép localhost truy cập phpmyadmin.Apr 24, 2020 at 13:14
Khởi động lại Apache [HTTPD] sau khi thực hiện các thay đổi. Tôi sẽ đề xuất thử nghiệm trên localhost hoặc sử dụng các công cụ dòng lệnh như Curl để rất HTTP có được các tác phẩm và không có vấn đề cấu hình nào khác.navarq
Đã trả lời ngày 10 tháng 2 năm 2016 lúc 21:332 gold badges12 silver badges18 bronze badges
Alvin Bunkalvin Bunk
# 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
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
Order Deny,Allow
Deny from All
Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
97.4693 huy hiệu vàng28 Huy hiệu bạc43 Huy hiệu đồng
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
0Centos 7 Falling Cài đặt đi kèm với gói ModSecurity được cài đặt và bật để ngăn truy cập web vào phpmyadmin. Vào cuối phpmyadmin.conf, bạn nên tìmMar 6, 2021 at 8:59
AddDefaultCharset UTF-8
# Apache 2.4
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
1Điều này cung cấp cho bạn câu trả lời cho vấn đề. Bằng cách thêmOct 10, 2021 at 9:29
Trong khối "Thư mục/usr/Share/phpmyadmin/", bạn có thể giải quyết 'truy cập bị từ chối' vào phpmyadmin, nhưng bạn có thể tạo các vấn đề bảo mật.ChinhNV
Đã trả lời ngày 18 tháng 7 năm 2019 lúc 8:372 silver badges4 bronze badges