【问题标题】:Accessing XAMPP server from another PC on LAN从 LAN 上的另一台 PC 访问 XAMPP 服务器
【发布时间】:2020-11-19 22:55:27
【问题描述】:

我正在尝试为我们的办公室创建一个网站,我们只能从本地网络访问该网站。网站在我的电脑上运行,但在网络中的另一台电脑上却没有。

我允许 Apache 思想防火墙,并在防火墙中创建了一个新的入站符文,以允许所有应用程序通过思想端口 80 和 443。

在 apache httpd 中也改变了行 -

# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 192.168.2.51:80
Listen 192.168.2.51:80

还有-

# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#
<Directory />
    AllowOverride All
    Require all granted
</Directory>

还写了我的IP地址IPv4协议,启用网络和共享中心的每个选项,并将连接设置为私有。

仍然,我无法从另一台 PC 访问该网站,当我诊断它时显示: "您的计算机似乎配置正确,但检测到的设备或资源 (192.162.2.51) 没有响应。

如果有人可以帮助我,将不胜感激,提前谢谢大家!

【问题讨论】:

  • 顺便说一句,我也无法从笔记本电脑访问我的主 PC 共享文件夹,错误消息:Windows 无法访问 Desktop-SJN7Q8V。检查名称的拼写。否则,您的网络可能有问题。要尝试识别和解决网络问题,请单击诊断。但我可以从主 PC 访问笔记本电脑上的文件夹。

标签: mysql apache xampp lan


【解决方案1】:
1. Go to Your XAMPP Control panel
2. Click on apache > config > Apache (httpd.conf)
3. Search for Listen 80 and replace with Listen 8080
4. After that check your local ip using ipconfig command (cmd console)
5. Search for ServerName localhost:80 and replace with your local ip:8080 (ex.192.168.1.156:8080)
6. After that open apache > config > Apache (httpd-xampp.conf)
7. Search for Alias /phpmyadmin “C:/xampp/phpMyAdmin/” AllowOverride AuthConfig Require local Replace with Require all granted ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
8. Go to xampp > config > click on service and port setting and change apache port 8080
9. restart xampp
10.Then hit your ip:8080 (ex.xxx.xxx.x.xxx:8080) from other computer

我是这样做的,它的工作原理,请通过尝试这种方式检查,希望对您有所帮助。

【讨论】:

  • 感谢您的回复,这现在不起作用,无论如何我需要稍后在工作中执行此操作并在那里以管理员身份运行 XAMPP 我需要联系其他 IT,如果我试图避免有可能
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-03-02
  • 2019-08-19
  • 1970-01-01
  • 1970-01-01
  • 2016-04-30
  • 1970-01-01
  • 2013-02-06
相关资源
最近更新 更多