Home » Questions » Computers [ Ask a new question ]

How do I set up a web server on my local intranet

How do I set up a web server on my local intranet

I'm running a MAMP stack on my iMac and I want to be able to access this server on any computer in my local network.

Asked by: Guest | Views: 107
Total answers/comments: 1
Guest [Entry]

"If you're behind a router, and the port isn't forwarded, people outside shouldn't be able to access the MAMP server. If it's currently forwarded, take that off as people outside can indeed view it this way. If you want people on your network to access it, give them your local IP (192.168.x.x address). Then they can use the IP address itself, add a hosts file entry, or even use your hostname depending on your router.

An alternate solution is to add a Deny rule in httpd.conf in a Directory directive or in .htaccess:

Order Deny,Allow
Deny from all
Allow from 192.168.0.0/255.255.0.0

This way only local 192.168.x.x addresses in the 255.255.0.0 subnet can access the page for example.

See more on Apache Auth."