简体   繁体   中英

How to limit access to http://localhost/xampp/

I installed xampp on a comupter (for example A) in a network, I set IP for apache so users in the network are able to access the localhost on the machine A. I installed a web project in htdocs directory so users can see that page using IP_OF_MACHINE/project . the problem is they can see IP_OF_MACHINE/xampp or IP_OF_MACHINE/phpmyadmin page while I want them to be able to see only the project not other pages. How do I can achieve this?

You can create a .htaccess file in the folders you don't want to be public and inside the .htaccess write the following :

order allow,deny
allow from 127.0.0.1
deny from all

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM