Home > Backend Development > PHP Tutorial > 经过Alias来修改phpMyAdmin的默认访问路径

经过Alias来修改phpMyAdmin的默认访问路径

WBOY
Release: 2016-06-13 13:24:50
Original
1470 people have browsed it

通过Alias来修改phpMyAdmin的默认访问路径

?

phpMyAdmin的配置文件phpMyAdmin.conf文件位于/etc/httpd/conf.d/目录下,所有位于/etc/httpd/conf.d/目录中的配置文件都是httpd的子配置文件,任何一个子配置文件的语法错误都可能导致httpd启动失败。

?

[root@fedora?log]#?httpd?-t????//该命令可用于检查与httpd相关的配置文件的语法是否正确

?

phpMyAdminweb访问方式:

phpMyAdmin.conf中的Alias行决定了phpMyAdminweb访问路径:

[root@fedora?log]#?cat?/etc/httpd/conf.d/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

Alias?/nima/shangbuqi??/usr/share/phpMyAdmin

?

???Order?Deny,Allow

???Deny??from?All

???Allow?from?127.0.0.1

???Allow?from?192.168.18.0/24

???Allow?from?192.168.1.0/24

???Allow?from?::1

?

Alias?/nima/shangbuqi??/usr/share/phpMyAdmin表明phpMyAdminweb访问路径为:

www.mydomain.com/nima/shangbuqi

?

下面的DenyAllow表示允许那些主机访问phpMyAdminOrder的顺序是"Deny,Allow",表示禁止所有IP访问,除了接下来Allow?from中定义的主机外。

?

注:/nima/shangbuqi是个虚拟路径,在服务器上没有该目录,httpd.conf中定义的web服务器根目录下更不会有该目录。

?

?

如果在phpMyAdmin的登陆页面中示:"Cannot?load?mcrypt?extension.?Please?check?your?PHP?configuration.",则表明服务器没有安装php-mcrypt包。

?

完了以后重启 service httpd restart

Related labels:
source:php.cn
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