WAMPServer,通过手机访问服务器

因此,我用一些唯一的URL设置了一些虚拟主机,它们在桌面上可以正常工作。但是,当我在网络上连接移动设备时,它似乎无法正确访问任何东西,但只能访问默认的localhost虚拟主机,而这仅是它是我拥有的唯一虚拟主机。


我的设置和编码几乎与此相同,只是网站标题不同


在另一台设备上运行服务器3.0虚拟主机


虽然该解决方案将我重定向到我的唯一网址,但默认的wordpress网站上缺少图片。


有没有人设法让移动设备完全访问本地主机以外的链接?


白板的微信
浏览 1074回答 3
3回答

守着一只汪

我得到你没有访问权限/禁止在此服务器上hosts file : 192.168.1.2 example.localhttpd.conf file:Listen 0.0.0.0:8081Listen [::0]:8081Listen 192.168.1.2:8082vhosts file:# Virtual Hosts#<VirtualHost *:8081>&nbsp; ServerName localhost&nbsp; ServerAlias localhost&nbsp; DocumentRoot "${INSTALL_DIR}/www"&nbsp; <Directory "${INSTALL_DIR}/www/">&nbsp; &nbsp; Options +Indexes +Includes +FollowSymLinks +MultiViews&nbsp; &nbsp; AllowOverride All&nbsp; &nbsp; Require local&nbsp; </Directory></VirtualHost><VirtualHost *:8082>&nbsp; &nbsp; ServerName example.local&nbsp; &nbsp; DocumentRoot "c:/wamp64/www/goodmorning"&nbsp; &nbsp; <Directory&nbsp; "c:/wamp64/www/goodmorning/">&nbsp; &nbsp; &nbsp; &nbsp; Options +Indexes +Includes +FollowSymLinks +MultiViews&nbsp; &nbsp; &nbsp; &nbsp; AllowOverride All&nbsp; &nbsp; &nbsp; &nbsp; Require local&nbsp; &nbsp; &nbsp; &nbsp; Require ip 192.168.1.2&nbsp; &nbsp; </Directory></VirtualHost>有什么建议吗?Wampp 3.1.9 64位

慕慕森

我的电话无法定向到图像URL,所以我按照您所说的那样进行操作,而端口仅与我的PC的IP一起播放。因此,我的站点的域名/服务器名称分别为192.168.1.100:8000、192.168.1.100:8001,依此类推,例如,不要检查虚拟主机定义并在Wamp设置中重复服务器名称。最终,在永久链接设置下的wordpress中,并使用一些插件(例如天鹅绒蓝),将URL更改为唯一的URL并不是很困难,这样可以查看我的手机在不同网站上的外观。非常感谢您的详细解释!
打开App,查看更多内容
随时随地看视频慕课网APP