Home > Database > phpMyAdmin > body text

What does the content in phpMyAdmin.conf mean?

藏色散人
Release: 2021-11-24 16:36:07
forward
2817 people have browsed it

The following column phpmyadmin tutorial will introduce you to the configuration file of phpmyadmin under Linux. I hope it will be helpful to friends in need!

Found the problem:

Configuration file of phpmyadmin under Linux

Alias /phpMyAdmin /usr/share/phpMyAdminAlias /phpmyadmin /usr/share/phpMyAdmin<Directory /usr/share/phpMyAdmin/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule></Directory>
Copy after login

My Apache version is 2.4, the above is /etc/httpd/ There is a section in conf.d/phpMyAdmin.conf. I don’t quite understand the specific meaning. Please explain it.

The explanation is as follows:

# 虚拟目录 http://localhost/phpMyAdmin 指向 /usr/share/phpMyAdmin
Alias /phpMyAdmin /usr/share/phpMyAdmin
# 虚拟目录 http://localhost/phpmyadmin 指向 /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
# 目录相关设置
<Directory /usr/share/phpMyAdmin/>
   # mod_authz_core.c 是 apache 2.3 之后新增的权限验证模块
   # 在这里用判断这个模块是否存在的方法区分 apache 版本
   # 如果存在说明当前 apache 版本至少是 2.3
   <IfModule mod_authz_core.c>
     # 下面一行注释表明这里在 apache 版本是 2.4 的时候会执行
     # Apache 2.4 
     # 新式的权限控制写法 满足以下任一条件才能访问
     <RequireAny>
       # 用户的请求 IP 是本机 ( IPv4 )
       Require ip 127.0.0.1
       # 用户的请求 IP 是本机 ( IPv6 )
       Require ip ::1
     # 权限控制区块结束
     </RequireAny>
   # 模块判断区块结束
   </IfModule>
   # 如果不存在 mod_authz_core.c 说明当前 apache 版本低于 2.3
   <IfModule !mod_authz_core.c>
     # 下面一行注释表明这里在 apache 版本是 2.2 的时候会执行
     # Apache 2.2
     # mod_authz_host 提供旧式的权限控制写法 Deny 在前表示白名单模式 
     Order Deny,Allow
     # 禁止除去下面 Allow 之外的所有请求
     Deny from All
     # 允许本地访问 ( IPv4 )
     Allow from 127.0.0.1
     # 允许本地访问 ( IPv6 )
     Allow from ::1
   # 模块判断区块结束
   </IfModule>
# 目录设置区块结束
</Directory>
Copy after login

Furthermore, this is not the configuration file of phpMyAdmin... This is Apache's...

The above is the detailed content of What does the content in phpMyAdmin.conf mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!