Set up xampp server on office lan

Santiago  picture Santiago · Feb 7, 2011 · Viewed 20.4k times · Source

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?

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?

Answer

Andy picture Andy · Feb 7, 2011

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...