Roman
Roman

Reputation: 504

Prevent accessing XAMPP localhost from another local PC by IP

It is well known how to access XAMPP sites from another computer in the local network (by typing IP address), please tell me how to FORBID to do so and still have a running localhost.

Upvotes: 2

Views: 4935

Answers (2)

Sathish Sundar
Sathish Sundar

Reputation: 194

Thats so simple,

just create a file named index.php/index.html

and just leave them empty,

now anybody who access your ip will be redirected to index.php and they can't be aware of what files you have.

Hope this answer helps.

Upvotes: 1

ty733420
ty733420

Reputation: 894

localhost (127.0.0.1 for IPv4) is only accessible from, well, the local host. Look for any "Listen" and "VirtualHost" directives and make sure they all say "localhost" and not another hostname or IP address.

Upvotes: 0

Related Questions