开发者

Set up xampp server on office lan

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 p开发者_JAVA百科cs sharing an internet connection via a router. How can i set this up as a lan which i can provide access to my webapp?


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


Perhaps you can try.

open and make sure C:/xampp/apache/conf/httpd.conf

DocumentRoot “C:/xampp/htdocs”
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all

and open C:/xampp/apache/conf/extra/httpd-vhost.conf add ..

NameVirtualHost name_site:80
 <VirtualHost name_site:80>
 DocumentRoot C:/xampp/htdocs/folder_site/
 ServerAdmin root@gmail.com
 ServerName xxx.xxx.xxx.xxx
 </VirtualHost>

note: xxx.xxx.xxx.xxx is xampp computer ip. This work on win 7.

If still dosn't work. Try to disable youe windows firewall.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜