我在尝试 access Xampp from a network
时遇到以下错误我已尝试过,但不知道如何解决它。任何帮助??我真的很困惑
禁止访问:
只能从本地网络访问所请求的对象。可以在“httpd-xampp.conf”文件中配置此设置。
答案 0 :(得分:92)
在你的 xampppath \ apache \ conf \ extra 打开文件 httpd-xampp.conf 并找到以下标记:
# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
并添加
"Allow from all"
允许来自:: 1 127.0.0.0/8 {line}
重新启动xampp,你就完成了。
在Xampp的更高版本中
...你可以简单地删除这部分
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
来自同一个文件,它应该可以在本地网络上运行。
答案 1 :(得分:41)
这个解决方案对我有用: http://www.apachefriends.org/f/viewtopic.php?f=17&t=50902&p=196185#p196185
编辑/opt/lampp/etc/extra/httpd-xampp.conf并在块<Directory "/opt/lampp/phpmyadmin">
底部添加要求所有已批准的行以获得以下代码:
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
答案 2 :(得分:8)
这个答案适用于Ubuntu上的XAMPP。
安装和下载手册(网站官方)
http://www.apachefriends.org/it/xampp-linux.html
启动XAMPP后,只需调用此命令:
sudo /opt/lampp/lampp start
您现在应该在屏幕上看到类似的内容:
Starting XAMPP 1.8.1...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.
如果你有这个
Starting XAMPP for Linux 1.8.1...
XAMPP: Another web server daemon is already running.
XAMPP: Another MySQL daemon is already running.
XAMPP: Starting ProFTPD...
XAMPP for Linux started
。解决方案是
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/mysql stop
以及sudo //opt/lampp/lampp restart
您要修复大多数安全漏洞,只需调用以下命令:
/opt/lampp/lampp security
更改此文件后
sudo kate //opt/lampp/etc/extra/httpd-xampp.conf
查找并替换
#
# New XAMPP security concept
#
<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
Allow from all
#\
# 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>