需要在 OpenSUSE 中启用 http Linux

Need to enable http in OpenSUSE Linux

我的机器上新安装了Linux OpenSUSE。我还在该服务中安装了 Xampp。盯着 apache 之后,我可以使用本地主机 url 查看 PHP apache。但是当我尝试使用 IP 地址时。页面中没有显示任何内容。

即 localhost/xampp.php 有效。 但是 http://10.21.30.220/xampp.php 不起作用。

我检查了 http 端口和 apache 以及 ar 运行。

  linux-pott:~ # /opt/lampp/lampp status
  Version: XAMPP for Linux 5.5.19-0
  Apache is running.
  MySQL is running.
  ProFTPD is running.

linux-pott:~ # netstat -tulppn | grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      24782/httpd     

我该如何解决我的问题。我再次告诉我 OS 是 Linux OpenSUSE。

尝试使用以下命令禁用防火墙

 /sbin/SuSEfirewall2 off

在您的 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 {行}

重启xampp,大功告成。