在Office Lan上设置Xampp服务器 [英] Set up xampp server on office lan
问题描述
我正在寻找在小型办公室中使用xampp设置服务器的方法.我当然会保护xampp,但是为了使我的webapp可用于网络上的其他4台PC,我是否只是创建一个虚拟主机?有没有办法确保只能通过局域网访问webapp?
Im looking to set up a server using xampp within a small office. I will ofcourse secure xampp but in order to make my webapp available to the other 4 PCs on the network do i just create a virtual host? Is there a way to ensure that access to the webapp is only available on the lan?
当前设置包括4台通过路由器共享Internet连接的计算机.如何将其设置为可以访问我的Web应用程序的局域网?
The current setup includes 4 pcs sharing an internet connection via a router. How can i set this up as a lan which i can provide access to my webapp?
推荐答案
使用.htaccess文件或在httpd.conf中的VirtualHost标记中设置权限.您所要做的就是将其放在保存网页的文件夹内名为.htaccess
的文件中:
Use an .htaccess file or set up permissions in the VirtualHost tags in httpd.conf. All you have to do is put this in a file named .htaccess
inside of the folder holding your webpages:
order deny,allow
deny from all
allow from <ip you want>
allow from <ip you want>
allow from <ip you want>
etc...
这篇关于在Office Lan上设置Xampp服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!