Hi,
You can use an access restriction system with user name and password that can be applied to VirtualHost folders, i.e. to the one on the Wampserver homepage (localhost)
To do this you create a text file ".htpasswd" located in "j:\wamp\www\.htpasswd" (Adpate the complete path according to your own installation).
In this file, you put pairs "username:passwords". It can only have one, but you can put several, of the form:
username1:password1
username2:password2
etc.
As with all configuration files (Apache, PHP, MySQL, etc.) the last line must always end with a line break, i.e. an empty line last.
Then you modify the VirtualHost localhost in the wamp\bin\apache2.4.33\conf\extra\httpd-vhosts.conf file by replacing the original one:
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
by
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
# Require local
AuthName "Restricted access"
AuthType Basic
AuthUserFile "${INSTALL_DIR}/www/.htpasswd"
require valid-user
</Directory>
</VirtualHost>
And each time a user, either voluntarily, by mistake, or by VirtualHost by default, will want to access localhost, a user name and password will be requested.
---------------------------------------------------------------
Documentation Apache -
Documentation PHP -
Documentation MySQL -
Wampserver install files & addons