查看完整版本: 在CentOS7 使用 yum 安裝 phpMyAdmin 允許任意IP存取


dannyliao 2016-9-16 14:13

在CentOS7 使用 yum 安裝 phpMyAdmin 允許任意IP存取

# yum -y install phpMyAdmin<br># vim /etc/httpd/conf.d/phpMyAdmin.conf<br><br>透過 vi 指令修改,將底下預設的設定檔 Mark 起來<br>[quote] <br>#&lt;Directory /usr/share/phpMyAdmin/&gt;<br>#&nbsp; &nbsp;&lt;IfModule mod_authz_core.c&gt;<br>#&nbsp; &nbsp;&nbsp;&nbsp;# Apache 2.4<br>#&nbsp; &nbsp;&nbsp;&nbsp;&lt;RequireAny&gt;<br>#&nbsp; &nbsp;&nbsp; &nbsp; Require ip 127.0.0.1<br>#&nbsp; &nbsp;&nbsp; &nbsp; Require ip ::1<br>#&nbsp; &nbsp;&nbsp;&nbsp;&lt;/RequireAny&gt;<br>#&nbsp; &nbsp;&lt;/IfModule&gt;<br>#&nbsp; &nbsp;&lt;IfModule !mod_authz_core.c&gt;<br>#&nbsp; &nbsp;&nbsp;&nbsp;# Apache 2.2<br>#&nbsp; &nbsp;&nbsp;&nbsp;Order Deny,Allow<br>#&nbsp; &nbsp;&nbsp;&nbsp;Deny from All<br>#&nbsp; &nbsp;&nbsp;&nbsp;Allow from 127.0.0.1<br>#&nbsp; &nbsp;&nbsp;&nbsp;Allow from ::1<br>#&nbsp; &nbsp;&lt;/IfModule&gt;<br>#&lt;/Directory&gt;<br>[/quote]<br><br>修改成<br>[quote]<br>&lt;Directory /usr/share/phpMyAdmin/&gt;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Options none<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;AllowOverride Limit<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Require all granted<br>&lt;/Directory&gt;<br>[/quote]<br><br>重新啟動伺服器<br>systemctl restart&nbsp;&nbsp;httpd.service<br><br>這樣就不受IP存取的限制了~
頁: [1]
查看完整版本: 在CentOS7 使用 yum 安裝 phpMyAdmin 允許任意IP存取