NxA
NxA

Reputation: 159

Configure LAMP webserver in a LAN

i want configure a lamp webserver to show a webpage only to the others host connected on the LAN. We can suppose that the ip on the lamp server is: 192.168.2.4 and i want that if a host goes on 192.168.2.4 the server shows a webpage only if the host is connected in LAN.

What i need to set?

Upvotes: 1

Views: 1147

Answers (2)

Satyam Singh
Satyam Singh

Reputation: 1150

In the virtual host file i.e /etc/apache2/sites-enabled/default, you can mention the IP's which you want to allow. Search for 'Allow From' section in the file and edit the IPs you want to add. Don't forget to restart apache2 server by sudo service apache2 restart

Upvotes: 1

vretamal
vretamal

Reputation: 1515

If that pc or server only has private ip you shouldnt configure anything, but if that pc or server has public ip you could create a virtual interface (if you use linux) and configure the virtual host with that interface

Upvotes: 0

Related Questions