在不動到 source 的前提,想到了可以在 Apache web server 端加上 basic authentication:
Apache virtual host 設定檔 vhost.conf
<VirtualHost 10.0.0.1:80>
ServerName example.com
DocumentRoot /home/user/www
DirectoryIndex index.php
<Directory /home/user/www>
Deny from all
# Allow from 10.0.2.1 # 允許從這個 IP 來的不用認證
AuthUserFile ~/.htpasswd
AuthName authorization
AuthType Basic
Satisfy Any
require valid-user
</Directory>
</VirtualHost>
重啓 Apache 就生效了用 htpasswd 建立帳號/密碼設定檔
$ htpasswd ~/.htpasswd brian New password: Re-type new password: Adding password for user brian
關於 htpasswd 的使用方式請參考 htpasswd - Manage user files for basic authentication
BA8FB5BBDD
回覆刪除kiralık hacker
hacker arıyorum
belek
kadriye
serik