阻止其他计算机通过 LAN 网络访问 phpmyadmin 页面,除了本地主机.? [英] Block access to phpmyadmin page from other computers over LAN Network except Localhost.?

查看:34
本文介绍了阻止其他计算机通过 LAN 网络访问 phpmyadmin 页面,除了本地主机.?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过 LAN 网络阻止其他计算机访问 phpMyAdmin 页面或 xampp 设置页面?但是以同样的方式它应该可以被本地主机或 127.0.0.1 访问,我试图在 httpd.conf 页面中设置为

Is it possible to block access to phpMyAdmin page or the xampp Settings page for other computers over the LAN network? But in the same way it should be accessible for localhost or 127.0.0.1, I tried to set in the httpd.conf page as

Listen 127.0.0.1:80

但是当我这样做时,我无法从我的计算机或网络中的任何其他计算机访问地址为 http://myhostname/website 的站点.

But when I did so I was not able to access the site with the address http://myhostname/website from my computer or from any other computer from the network.

我想阻止其他计算机的 xampp 设置页面,但他们应该能够访问该网站.

I would like to block the xampp settings page for other computers but they should be able to access the website.

推荐答案

要禁用网络访问,请打开位于 xampp-folder\apache\conf\ 的 httpd-xampp.confextra\httpd-xampp.conf

To disable access from your network, Open httpd-xampp.conf located in xampp-folder\apache\conf\extra\httpd-xampp.conf

改变这个:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

为此:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

不要忘记重新启动Apache.现在 http://localhost/phpmyadmin 将导致 403 Forbidden 错误.

Don't forget to restart Apache. Now http://localhost/phpmyadmin will result 403 Forbidden error.

有关阅读的更多信息,您可以阅读 http://www.hellothupten.com/2013/11/24/block-access-to-phpmyadmin-from-lan-network-on-xampp/

For more info read you can read http://www.hellothupten.com/2013/11/24/block-access-to-phpmyadmin-from-lan-network-on-xampp/

这篇关于阻止其他计算机通过 LAN 网络访问 phpmyadmin 页面,除了本地主机.?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆